Change Parameter API
Physics Parameters
This page enumerates all physics subsystem parameters that can be modified using the Change Parameter API call. More info about it can be found here.
Component Name(s) | Parameter Name | Parameter Type | Parameter Info |
---|---|---|---|
PhysicsWorld | enableSimulation | Boolean | Enable or disable physics simulation. Setting this value to false will behave the same as if no physics world was added. |
PhysicsWorld | gravity | Vector3 | The force representing gravity in world space (positive Y is down) |
PhysicsWorld | kinematicKnockbackFactor | Float | Multiplier of an impulse which will be applied by static physics bodies to non-static physics bodies with which they collide. Setting this value to 0 will disable the knockback. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | mass | Float | The mass of an object. Zero mass implies static object. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | ignoreGravity | Boolean | Controls if the object is affected by gravity. Other forces will still move the object. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | solidObject | Boolean | Solid objects will collide with other solid objects. Making bodies non-solid can be useful for detecting collisions, but not responding to them. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | fixedPosition | Vector3Boolean | Physics does not affect the position of the object in the axes that are fixed. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | fixedRotation | Vector3Boolean | Physics does not affect the rotation of the object in the axes that are fixed. |
PhysicsBoxBody , PhysicsSphereBody , PhysicsCapsuleBody | restitution | Float | Coefficient representing the elastic collision ratio for a certain object. |
PhysicsBoxBody | extent | Vector3 | X, Y, and Z sizes of the collider. |
PhysicsSphereBody | radius | Float | Radius of the sphere. |
PhysicsCapsuleBody | radius | Float | Radius of the capsule. |
PhysicsCapsuleBody | height | Float | The height of the cylinder between two half spheres. Height of 0 makes this the same as a sphere collider. |
PhysicsSpringConstraint, PhysicsRopeConstraint | inheritFromParent | Boolean | When a parent body also has a physics constraint of the same type as its parent, you can check this option to inherit the same parameters (making the setup a lot easier for chains where each element has the same properties). |
PhysicsSpringConstraint, PhysicsRopeConstraint | localContactPivot | Vector3 | Offset of the constraint contact point from the current object (in current object local space). |
PhysicsSpringConstraint, PhysicsRopeConstraint | parentContactPivot | Vector3 | Offset of the constraint contact point from the parent object (in parent object local space). |
PhysicsSpringConstraint, PhysicsRopeConstraint | overrideErp | Boolean | Set to true when you wish to override the default ERP (error reduction parameter). |
PhysicsSpringConstraint, PhysicsRopeConstraint | erp | Float | Error reduction parameter. More info here. |
PhysicsSpringConstraint, PhysicsRopeConstraint | overrideCfm | Boolean | Set to true when you wish to override the default CFM (constraint force mixing). |
PhysicsSpringConstraint, PhysicsRopeConstraint | cfm | Float | Constraint force mixing. More info here. |
PhysicsSpringConstraint | noElongationLimit | Boolean | Disables minimum and maximum elongation limit of the spring (the spring can be infinitely compressed and expanded). |
PhysicsSpringConstraint | minimumElongation | Float | Length of the spring when maximally compressed. |
PhysicsSpringConstraint | maximumElongation | Float | Length of the spring when maximally expanded. |
PhysicsSpringConstraint | stationaryElongation | Float | Length of the spring when in equilibrium. The spring will oscillate around this point. |
PhysicsSpringConstraint | stationaryDirection | Vector3 | The direction in which the spring expands. |
PhysicsSpringConstraint | isInWorldSpace | Boolean | If checked, the stationaryDirection is in world space, otherwise, it is in the parent body’s local space. |
PhysicsSpringConstraint | enableSpring | Boolean | Enables or disables the spring. |
PhysicsSpringConstraint | springStiffness | Float | Force required to compress or expand the spring. |
PhysicsSpringConstraint | springDamping | Float | Influence of oscillation around the stationary (equilibrium) point. |
PhysicsRopeConstraint | ropeLength | Float | Length of the rope. |
PhysicsForceModifier | enableModifier | Boolean | Enable or disable physics modifier. Setting this value to false will behave the same as if no physics force modifier was added. |
PhysicsForceModifier | applyToChildren | Boolean | Apply force to child game objects (shallow). |
PhysicsForceModifier | applyToDescendants | Boolean | Apply force to child game objects (recursive). |
PhysicsForceModifier | force | Vector3 | Force vector. |
PhysicsForceModifier | isInWorldSpace | Boolean | If true the force vector is in world space, otherwise it is in the game objects local space. |
PhysicsForceModifier | scaleByMass | Boolean | Scales the force by the mass of the physics body (so the specified force will behave as if it was acceleration instead). |