Started by
Freddy101
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
ahhhh ok i didnt have my bone labeled head maybe that was why
yeah this didnt work the pitch hasnt moved at all I can see the entitys line of sight is just always looking straight
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.
Maybe you stumbled upon the error where custom entities constantly reset their pitch and do some other weerd stuff