0

some script api requests

method to determine if an object is set to dynamic

Bool RigidBodyComponent.IsDynamic

 

built in rounding of vectors and quaternions for display purposes

Vector somevector;

somevector.Round(2);

Vector RoundVector(Vector what, int decimals)
{
    return new Vector(
        (float)Math.Round(what.X, decimals),
        (float)Math.Round(what.Y, decimals),
        (float)Math.Round(what.Z, decimals),
        (float)Math.Round(what.W, decimals)
    );
}//RoundVector

Quaternion RoundQuaternion(Quaternion what, int decimals)
{
    return new Quaternion(
        (float)Math.Round(what.X, decimals),
        (float)Math.Round(what.Y, decimals),
        (float)Math.Round(what.Z, decimals),
        (float)Math.Round(what.W, decimals)
    );
}//RoundQuaternion

10 comments

Please sign in to leave a comment.