Feel
4.3
The best way to improve your game's feel and make it extra juicy
|
Add this class to a Rigidbody or Rigidbody2D to be able to edit its center of mass from the inspector directly More...
Public Types | |
enum | AutomaticSetModes { AutomaticSetModes.Awake, AutomaticSetModes.Start, AutomaticSetModes.ScriptOnly } |
the possible modes this class can start on More... | |
Public Member Functions | |
virtual void | SetCenterOfMass () |
Sets the center of mass on the rigidbody or rigidbody2D More... | |
Public Attributes | |
Vector3 | CenterOfMassOffset |
the offset to apply to the center of mass More... | |
AutomaticSetModes | AutomaticSetMode = AutomaticSetModes.Awake |
whether to set the center of mass on awake, start, or via script only More... | |
bool | AutoDestroyComponentAfterSet = true |
whether or not this component should auto destroy after a set More... | |
float | GizmoPointSize = 0.05f |
the size of the gizmo point to display at the center of mass More... | |
bool | SetCenterOfMassButton |
a button to test the set method More... | |
Protected Member Functions | |
virtual void | Awake () |
On Awake we grab our components and set our center of mass if needed More... | |
virtual void | Start () |
On Start we set our center of mass if needed More... | |
virtual void | Initialization () |
Grabs the rigidbody or rigidbody2D components More... | |
virtual void | OnDrawGizmosSelected () |
On DrawGizmosSelected, we draw a yellow point at the position of our center of mass More... | |
Protected Attributes | |
Vector3 | _gizmoCenter |
Rigidbody | _rigidbody |
Rigidbody2D | _rigidbody2D |
Add this class to a Rigidbody or Rigidbody2D to be able to edit its center of mass from the inspector directly
|
protectedvirtual |
On Awake we grab our components and set our center of mass if needed
|
protectedvirtual |
Grabs the rigidbody or rigidbody2D components
|
protectedvirtual |
On DrawGizmosSelected, we draw a yellow point at the position of our center of mass
|
virtual |
Sets the center of mass on the rigidbody or rigidbody2D
|
protectedvirtual |
On Start we set our center of mass if needed
|
protected |
|
protected |
|
protected |
bool MoreMountains.Tools.MMRigidbodyCenterOfMass.AutoDestroyComponentAfterSet = true |
whether or not this component should auto destroy after a set
AutomaticSetModes MoreMountains.Tools.MMRigidbodyCenterOfMass.AutomaticSetMode = AutomaticSetModes.Awake |
whether to set the center of mass on awake, start, or via script only
Vector3 MoreMountains.Tools.MMRigidbodyCenterOfMass.CenterOfMassOffset |
the offset to apply to the center of mass
float MoreMountains.Tools.MMRigidbodyCenterOfMass.GizmoPointSize = 0.05f |
the size of the gizmo point to display at the center of mass
bool MoreMountains.Tools.MMRigidbodyCenterOfMass.SetCenterOfMassButton |
a button to test the set method