Per tests on sitting entity (wolf), when they rotate to face you (or any target), they are only animating their rotation. Under the hood, getViewDirection() and getRotation() remain the same, until the entity walks again, and then it updates. I want to get it's rotation as is visually represented. Maybe something like getRotation() with the animation offset?
#Entity's visual rotation is NOT the same as it's actual rotation?
1 messages · Page 1 of 1 (latest)
The wolf animation you're referring to must been "animation.common.look_at_target" with the following JSON file:
{
"format_version" : "1.8.0",
"animations" : {
"animation.common.look_at_target" : {
"loop" : true,
"bones" : {
"head" : {
"relative_to" : {
"rotation" : "entity"
},
"rotation" : [ "query.target_x_rotation - this", "query.target_y_rotation - this", 0.0 ]
}
}
}
}
}
-# vanillaRP/animations/look_at_target.animation.json
I can't really get my head to think of a way to retrieve the value. Might be simpler to just disable/prevents the animation entirely. Maybe using playAnimation and have the wolf play the look animation with 0 blend time
Maybe you could try your luck and use the same Molang inside your BP animation_controller.json, but that'll require editing vanilla wolf.json
All good thoughts, thank you for taking the time! So ultimately I will need that rotation value to do an applyImpulse() in the scripts, so I'll need to somehow save it from molang, which I don't think is possible (correct me if I'm wrong)