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?
There’s a node called ‘look at rotation’, solves all your problems
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 because my plan was to calculate the orientation for a Multi Box Trace By Channel
And it doesn’t work the same there…
pezzott1
(pezzott1)
March 22, 2023, 10:15pm
7
Assuming you are continuing this post:
long screenshot is long:
[image]
yeah, no. Forums do not like high res pics:
script:
project
You can try this to make the box trace oriented to the camera:
Result:
Hope it helps.
2 Likes
pezzott1
(pezzott1)
March 23, 2023, 1:36am
9
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?