I have a Paper 2D sprite that is coded to set it to rotate to face my sprite that’s below using the X axis only wherever I am on that axis by using an event tick and set actor rotation. But when the sprite rotates to an angle that’s directly forwards (going from left to right), it flips over on an axis I don’t want it to and because of that it becomes invisible. None of my methods to lock the rotation axis’s worked. Can anyone help?
Hey there, if it’s 2d you only need to rotate on one axis (clockwise and counterclockwise, from the image’s perspective), for the rest of the axis just set them to hardcoded values so they don’t change.
I’m pretty sure i’m only rotating on one axis using split struct pin and yet it still flips over when passing from looking left to right. What do u mean about hard coded values?
Fixed/Constant values.
How do I use those
First you need to find what is the axis that you want to rotate. As an example, assuming it’s the Yaw, you connect the yaw wire from the find look at, but roll and pitch have fixed values (i’ve set them to 12 and 14 as an example, they probably need to be 0).
I actually need to go out and will be back later in the afternoon, and will try again there and report if it doesn’t work. I really appreciate the help as its for a college project and its a massive bug that refuses to be fixed. Every other error I have fixed, but not this one.
Nope, hard coded values doesn’t stop it from flipping over in any axis
Why do you do 2 set actor rotation in a row for the same actor?
it was a part of an attempted bug fix that didn’t work. It aint there anymore
Can you show me an updated screenshot of the blueprint script? If you dont execute the set actor rotation you don’t get any rotation right? Are you sure you used the correct axis to be dynamic?