I used some auto-aiming turrets at my last build and there is some examples for copypaste:
For 45 degree elevation
clamp((TargetElevation + rate(TargetElevation)(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2)) + (asin(((TargetDistance + rate(TargetDistance)(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2))* 9.81)/(pow(1000, 2)))/2),-10,45)/45
For 180 degree rotation
(TargetHeading - Heading + rate(TargetHeading)*(((1000 * sin(asin((TargetDistance * 9.81)/(pow(1000, 2)))/2))/9.81) * 2))/180
These are not written by me I used mahardika's builds to get them
@Star54ilor go to JointRotator part in XML Editor and set the range part to 180.
just one thing I'm dying to know, how can I set the 180 degree rotation code to set a motion limit of whatever number I please?
@Eggplant I have seen that them become a nightmare for students at my age (:
@Eggplant
Good for you.
i like trigonometry