Clamping Rotation Axis Problem

Hello, im trying to solve this but i cant in my own, i have a plane with a texture that i want to put inside a blueprint, lets say this small plane is in front of a big box and when i rotate the camera i want the plane, just the plane, to follow the camera up to 45 or -45 degrees. im using this bp:

(the node in spanish are, “get player pawn” and “clamp angle”

My problem is that since i lock the rotation on -45 and 45 degrees it takes it as world rotation ? and it only works on one direcion it just ignores what direction the blueprint is facing, how can i make it obey the blueprint direction ? is there a way to reference it as a base rotation ?. thanks in advance

You can do this

I attached the plane to a scene in the BP. That way, it’s easier to get the orientation of the plane right before just setting the rotation of the scene:

1 Like

341658-45245.gif

1 Like

hey man, im sorry that i didnt get back to you, i dont mean to disrespect your effort in helping me , just a couple of hard days.

i tried the blue print you gave me, its even more efficient than mine, but i still have the same probem, it works as you show on your gif, lets say that i take the example you made and rotate the blue pirnt 90° when i hit play the rotation is still aplied on the same axis ignoring the world rotation of the bp.

341925-2021-06-20-19-53-42.gif

Ah, with you. What you need is

Problem is that you want to limit relative rotation, but ‘look at’ is in world, so we have to translate.

341942-planerotation.gif

oh my god, you´re so smart, i was trying to feed the world location to the scene , i had something similiar to your answer but i didnt catch the inverse rotation to translate, definitely im going the reed the documentation on that node. thank you very much for your time !

I actually have no idea how that node works, but I know what it’s for :slight_smile:

1 Like