Meteor 2 Scripting Functions
Physics
float getMass(int objectID)
Get the mass of an object in KG.
float playerMass = getMass(PLAYER_OBJECT);
print("Player mass is " + playerMass + "KG");
void setMass(int objectID, float mass)
Set the mass of an object in KG.
setMass(PLAYER_OBJECT, 1000);
Set mass to 0 make object static (cannot be moved).
bool getKinematic(int objectID)
Get the kinematic status of an object.
if (getKinematic(PLAYER_OBJECT))
{
print("Player is kinematic");
}
else
{
print("Player is not kinematic");
}
void setKinematic(int objectID, bool kinematic)
Set the kinematic status of an object.
setKinematic(PLAYER_OBJECT, true);
Kinematic objects cannot be affected by forces, and cannot collide with static or other kinematic objects.
void setCollidesWith(int object1ID, int object2ID, bool collides)
Set if an object can collide with another object.
setCollidesWith(PLAYER_OBJECT, 0, false);
Index
Generated on the 23 November 2024 at 08:20:43 (UK Time)