how to change entity head rotation

Started by Freddy101 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to change entity head rotation

hello im trying to make my entity spawn in with its head already turned in the same direction as mine and more importantly have it able to look up or down this is a geckolib mob btw and the head doesn't specifically have to be wat moves it can be just the body too 

 

 

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not sure if this'll work…
Wed, 01/24/2024 - 16:11

Not sure if this'll work with a Geckolib entity, but basically, you need one of your entity's bones to be named 'head,' and need to have the 'head movement' animation enabled when you import the file. (Actually, definitely won't work with a geckolib entity. Might be a workaround though.) You can then use the 'make entity look at' function to make your entity look at a certain position, (in this case the position of the player). By default this'll just make the entity turn to face things, but if you have the head animation enabled, it will also change its head pitch/yaw to face that position. 

 

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ahhhh ok i didnt have my…
Wed, 01/24/2024 - 18:08

ahhhh ok i didnt have my bone labeled head maybe that was why

 

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah this didnt work the…
Wed, 01/24/2024 - 20:16

yeah this didnt work the pitch hasnt moved at all I can see the entitys line of sight is just always looking straight

 

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It likely won't work for…
Thu, 01/25/2024 - 12:44

It likely won't work for Geckolib entities, since they use a separate rendering system, and thus can't have the default head animations enabled. There's probably a better tutorial out there for this, I'm not really that well versed on entity mechanics.

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe you stumbled upon the…
Wed, 04/10/2024 - 19:55

Maybe you stumbled upon the error where custom entities constantly reset their pitch and do some other weerd stuff