Yo so how do i use trigonometry to tell my turret where to aim assuming it can only turn left and right... i am thininking i can use the targets position.x and position.z value and the x position of the turret along with the z position of it. Then I can get value of. Target is 10 studs to the front (Z )and 4 studs to the left.(X). and using trigonometry i Get the angle with where to aim.

-- the angle will be inserted into a HingeConstraint that only turns alonge the horizontal plane

-- trying to find the least laggiest way it can do it. please help much appreciated

1 comment

0

guess it has something to do with CFrame:toObjectSpace()