Make entity move in the direction its looking?

Started by Spyjetray on Mon, 11/23/2020 - 19:48

Topic category: Help with modding (Java Edition)

Last seen on 14:17, 4. Dec 2020
Joined Jul 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make entity move in the direction its looking?
Mon, 11/23/2020 - 19:48

Hi,

I have made a procedure which makes an entity look in the same direction that the player looks but now I want to make the entity move in that direction, turning when the player also turns.

How do I achieve this as using straight-up movement vectors cause the entity to fly off in a specfic direction which doesn't work so what do I need to do to make it move in the direction it (and the player) is facing?

Thanks

Last seen on 23:41, 3. Jun 2021
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Dude how did you make the…
Mon, 11/30/2020 - 21:42

Dude how did you make the entity so it’d look in the same direction?

Last seen on 14:03, 1. Jul 2022
Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
this would be really useful…
Tue, 04/20/2021 - 19:00

this would be really useful for my mod, please keep me posted if you find out anything

 

Last seen on 12:17, 27. Jun 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(If you look North the…
Tue, 09/21/2021 - 20:38

(If you look North the entity will move North)

Direction of player = North

Override motion vector of entity to vx: 0 vy: 0 vz: -1

 

(If player looks North the entity will look North)

Direction of player = North

Set Rotation of entity yaw: (180) pitch: ()

 

Yaw means left or right, and pitch means up and down.

Last seen on 12:17, 27. Jun 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Btw make the Event trigger…
Tue, 09/21/2021 - 20:41

Btw make the Event trigger to, On entity tick.

Last seen on 12:17, 27. Jun 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Was this helpfull?
Fri, 11/12/2021 - 16:45

Was this helpfull?