I have an actor that represents a tree in the world. When it is hit, I want it to tilt away from the player. I have the attack direction vector. I have the attacker and the tree actor references. Here’s the catch. Using simple “MakeRotFromX” or “FindLookAtRotation” is not enough, because they rotate the tree on the Yaw axis. Which doesn’t make sense for a tree to rotate like that. It only has to tilt.
How do I calculate the new Roll and Pitch rotation for this tree actor to achieve this effect?
Oh my god, that’s so simple it’s genius. I thought I needed some complex math to calculate the new rotation and you give me this. Thank you for taking your time to help out!