Rotate plane so that it's side is facing the camera

Hey there! I’ve been trying to solve the math to find the rotation of a plane so that it’s side is always facing the camera. For reference, my game camera should be seeing this:


And in reality, the plane in 3D would be like this:

Any idea on how to calculate that? :frowning:

There’s a node called ‘look at rotation’, solves all your problems :slight_smile:

But you do have to make sure the X axis is the thing pointing…

Okey? And get the look at rotation from where to where ?

from your starting point (the plane mesh location) to the target point (the camera location).

Okey it worked but now I’m even more confused :sweat_smile: because my plan was to calculate the orientation for a Multi Box Trace By Channel
image
And it doesn’t work the same there…

Assuming you are continuing this post:

You can try this to make the box trace oriented to the camera:

Result:


Hope it helps.

2 Likes

Well… if the camera is at an angle then the box will be at an angle too. Wasn’t this what you had in mind?