Method ApplyScale
ApplyScale(in PhysicsMass, float)
Scale the mass of the body using provided scale.
Declaration
public static PhysicsMass ApplyScale(this in PhysicsMass pm, float uniformScale)
Parameters
Type | Name | Description |
---|---|---|
PhysicsMass | pm | The body's PhysicsMass component. |
float | uniformScale | The body's uniform scale. If this value is approximately 1.0, the function will early-out with no effect. |
Returns
Type | Description |
---|---|
PhysicsMass | A body's physics mass with respect to it's scale. |
Remarks
Do not use this function to scale physics mass for simulation purposes, that is done automatically by physics systems. Use it if you need PhysicsMass in one of your functions if the body has a non-identity scale component, and do not write back this mass to the body's entity components.