Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Triggers the force rotation algorithm. rotation in RADIENS
- --if boolean_direction is true, rotate clockwise, if false it rotates counterclockwise.
- function fpo(shipName, rotate_amount, boolean_direction)
- ship_to_rotate = mn.Ships[shipName]
- local vect_rotVelMax = ship_to_rotate.Physics.RotationalVelocityMax
- local t = rotate_amount/vect_rotVelMax["x"] --solve for the time.
- if boolean_direction == true then
- ship_to_rotate:doManeuver(t,0,100,0,true,0,0,0,false)
- elseif boolean_direction == false then
- ship_to_rotate:doManeuver(t,0,-100,0,true,0,0,0,false)
- else
- --nothing. If somehow this is nil then it'll go here.
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment