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:08, 14. Jul 2022
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:08, 14. Jul 2022
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 09:43, 1. Jun 2022
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:08, 14. Jul 2022
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 09:43, 1. Jun 2022
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 14:50, 29. Jul 2022
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

Last seen on 13:39, 24. Jul 2022
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This doesnt work for me, it…
Mon, 08/16/2021 - 22:57

This doesnt work for me, it says the files dont compile properly and i cant even test it out, did i do something wrong?heres the code

Last seen on 15:40, 27. Apr 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
crowinsanity13 you can find…
Tue, 08/31/2021 - 07:02

crowinsanity13 you can find on the forum that the motion vector block only overrides the motion one tick and thus need to be called every tick.