How to move an entity in the direction the player is facing

Started by MihlanDOta on Sat, 04/24/2021 - 11:13

Topic category: Help with modding (Java Edition)

Last seen on 10:04, 10. Jul 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to move an entity in the direction the player is facing
Sat, 04/24/2021 - 11:13

I have a procedure that is executed when the player right-clicked on an entity.

The entity must "jump" in the direction the player is facing. Tell me, how can this be implemented?

 

Thanks

Last seen on 10:04, 10. Jul 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So, I have found solution …
Sat, 04/24/2021 - 14:16

So, I have found solution

Set Event/target entity movement vector to vx: 0 - sin(Direction (yaw) in deg. relative to S of Source entity * PI / 180) vy: 0.3 vz: cos(Direction (yaw) in deg. relative to S of Source entity * PI / 180)

 

Last seen on 07:07, 19. Jul 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
MY EYES! please give a…
Mon, 06/21/2021 - 14:37

MY EYES! please give a screenshot, you can use "imgBB" for that.

Last seen on 10:04, 10. Jul 2021
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(No subject)
Sun, 06/27/2021 - 18:53

img

Last seen on 07:07, 19. Jul 2021
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Big Thanks!
Fri, 07/02/2021 - 10:23

Big Thanks!

Last seen on 16:37, 11. Jul 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You're the only one in…
Mon, 07/05/2021 - 16:59

You're the only one in centuries succeeding in this

So I ask for your help maybe you can do it

I have a custom shield and want for it to block ONLY attacks coming from front and not back. Do you have an idea for it ?

Also how do you cast for example a fireball in the direction player is facing ?

I see you are good with this so maybe you can help

thank you