Skip to content

Alter Collider

Alter Collider

Changes the collider shape and dimensions of a physics object.

Properties

System

Name Explanation Type
Depth The depth of the collider along the Z axis. Variable or Value
Height The height of the collider along the Y axis. Variable or Value
Points The vertices that define a convex hull collider shape. Requires at least 3 points. Vector
Shape The shape of the collider. Valid shapes include sphere, box, and convex hull. Variable or Value
Target The physics object to target with this command. Physics Object Reference
Width The width of the collider along the X axis. Variable or Value

Examples

Set Entity Collider to a Sphere

Changes entity 0's collider to a sphere shape with width, height, and depth of 1.

alter_collider(entity(0), sphere, 1, 1, 1);
{"Data":{"Depth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Points":[],"Shape":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":false,"IsPartyMember":false,"IsEntity":true,"IsUniqueID":false,"IsDoodad":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterColliderCommand"}

Set Entity Collider to a Box

Changes entity 0's collider to a box shape with width 2, height 3, and depth 1.

alter_collider(entity(0), box, 2, 3, 1);
{"Data":{"Depth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"3","VariableIndex":0,"Metadata":null},"Points":[],"Shape":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"2","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":false,"IsPartyMember":false,"IsEntity":true,"IsUniqueID":false,"IsDoodad":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterColliderCommand"}

Set Entity Collider to a Convex Hull with Points

Changes entity 0's collider to a convex hull shape defined by four vertices.

alter_collider(entity(0), convex_hull, 1, 1, 1, points: [{ 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }]);
{"Data":{"Depth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Height":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Points":[{"X":0,"Y":0,"Z":0},{"X":1,"Y":0,"Z":0},{"X":0,"Y":1,"Z":0},{"X":0,"Y":0,"Z":1}],"Shape":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"2","VariableIndex":0,"Metadata":null},"Width":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"Target":{"IsSelf":false,"IsPartyMember":false,"IsEntity":true,"IsUniqueID":false,"IsDoodad":false,"Identifier":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null}},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Physics.AlterColliderCommand"}