Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

GetDirectionTo Function

$
0
0
Here's a helpful little function to get the Pitch and Yaw to a target vector.

Code:
/*
VRageMath.Vector3D TV         This is the target vector.
IMyTerminalBlock Origin       Origin block.
IMyTerminalBlock Forward      Block directly in front of the origin.
IMyTerminalBlock Up           Block directly above the origin.
IMyTerminalBlock Right        Block directly to the right of the origin.
ref double Pitch              Reference to Pitch.
ref double Yaw                Reference to Yaw.
*/...
GetDirectionTo Function

Viewing all articles
Browse latest Browse all 903

Trending Articles