Howdy, lets say that a plane constantly changes its tilt up or down. How would I be able to find the angle of elevation given the length of the plane relative to the world, no matter the orientation of the plane.
(The wanted angle would be in degrees)
–SOLUTIONS I’VE TRIED–
I’ve tried using dot product, but given that there is no fixed length for the opposite and adjacent angle as the plane would be constantly changing its tilt, it hasn’t work for me at least on how I implemented it.
(platform is the plane part)
I’ve also thought of using ray casting but I feel like there is a better way than ray casting since there can be many edge cases that go along with it, for example what if the plane is not over a part, or what if the plane casts a ray that is thousands of studs away.
This post on finding an angle of a wedge part has a somewhat similar approach to what I want to accomplish, but given that it’s ray casting, it won’t work for me.
(if for some reason nothing else works, I will have to resort to ray casting)
RELATIVE TO A PART, NOT THE WORLD
Another solution I have been given, but wouldn’t work for me is this:
Given that there wouldn’t be a “v2” and it would only be relative to the world, I couldn’t find a way to reshape the formula given to fit my case.
TO EULER ANGLES / TO ORIENTATION
Just to add to the pile of solutions give than haven’t worked, I was suggested on using:
This didn’t work as it gave me the X and Z, which is not what I wanted, only the angle.
Any way to solve this would be greatly appreciated!