Hello, Roblox Devs!
Recently i had problem, when i tried to do a Mortar System.
My script is calculating Horizontal and Vertical angle of Mortar to do future curve of direction.
But i dunno how to get correct LookVector with these angles, to direct shell.
Please help me !! !!11 !
Angles is on radions, if it’s will help to solve my problem
I’m pretty sure you’re looking for Cross. You can use it to find a vector using two other vector parameters. You can use it on Vector2 values as well.
X = sin(az) * cos(el)
Y = sin(el)
Z = cos(az) * -cos(el)
this is assuming -Z is north, where az is the azimuth (horizontal angle) and el is the elevation (vertical angle)
if the angles aren’t correct you might want to add a minus sign somewhere or add/subtract 90 or 180 degrees randomly until its correct
i’ve tried this but it doesn’t help me, because they will return number above than one and speed of shell then going to be faster than original force
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.