kinemetic {get;set}

API -

return function()
    local app = getApp();
    local myObject = app.createGameObject();
    wait(3);
    myObject.physics.addBoxCollider();
    myObject.physics.hasRigidBody = true; --creates a rigidbody on the object.
    myObject.physics.layer = 'unique';
    
    myObject.physics.kinemetic = true;
    --other objects that are not kinemetic will treat this object as static
    --for the unique layer
    
    log(myObject.physics.hasRigidBody);
    
    --as soon as the script ends the object will be destroyed automatically.
    keepAlive();
end

Last updated