setObjectMass
Client-side
Server-side
Shared
Pair: getObjectMass
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function sets the mass of a specified object. Changing the mass leads to a different movement behavior for especially dynamic objects.
Syntax
setObjectMass ( )Code Examples
client
This script basically creates an object then get's the mass and set's its mass 300 more than it's original mass, then tell the client the old and new mass of the object.
local object = createObject(1225,0,0,3)local oldMass = getObjectMass(object)local newMass = oldMass+300.0setObjectMass(object,newMass)outputChatBox("Object Old Mass: "..oldMass..", New Mass: "..newMass)