Feel
5.2
The best way to improve your game's feel and make it extra juicy
|
Add this class to a GameObject to make it rotate on itself More...
Public Types | |
enum | UpdateModes { UpdateModes.Update, UpdateModes.LateUpdate, UpdateModes.FixedUpdate } |
Public Member Functions | |
virtual void | Rotate (bool status) |
Sets Rotating to true or false More... | |
virtual void | Orbit (bool status) |
Sets Orbiting to true or false More... | |
Public Attributes | |
bool | Rotating = true |
whether or not this object should be rotating right now More... | |
Space | RotationSpace = Space.Self |
the space to apply the rotation in More... | |
UpdateModes | UpdateMode = UpdateModes.Update |
whether movement should happen at Update, FixedUpdate or LateUpdate More... | |
Vector3 | RotationSpeed = new Vector3(100f, 0f, 0f) |
The rotation speed. Positive means clockwise, negative means counter clockwise. More... | |
bool | Orbiting = false |
if this is true, the object will also move around a pivot (only the position is affected, not the rotation) More... | |
bool | AdditiveOrbitRotation = false |
if this is true, the orbit plane will rotate along with the parent More... | |
Transform | OrbitCenterTransform |
the pivot to rotate around (if left blank, will be the object itself More... | |
Vector3 | OrbitCenterOffset = Vector3.zero |
the pivot (relative to the object's position in local space) to rotate around More... | |
Vector3 | OrbitRotationAxis = new Vector3(0f, 1f, 0f) |
the axis around which the object should rotate (don't make it zero) More... | |
float | OrbitRotationSpeed = 10f |
the speed at which to rotate More... | |
float | OrbitRadius = 3f |
the radius at which to orbit More... | |
float | OrbitCorrectionSpeed = 10f |
the speed at which the object catches up when orbit radius or axis changes More... | |
bool | DrawGizmos = true |
if this is true, will draw gizmos to show the plane, orbit and direction More... | |
Color | OrbitPlaneColor = new Color(54f, 169f, 225f, 0.02f) |
the color of the orbit disc More... | |
Color | OrbitLineColor = new Color(225f, 225f, 225f, 0.1f) |
the color of the orbit line More... | |
Vector3 | _orbitCenter |
Vector3 | _worldRotationAxis |
Plane | _rotationPlane |
Vector3 | _snappedPosition |
Vector3 | _radius |
Protected Member Functions | |
virtual void | Start () |
On start, we initialize our plane More... | |
virtual void | Update () |
Makes the object rotate on its center at Update More... | |
virtual void | FixedUpdate () |
Makes the object rotate on its center at FixedUpdate More... | |
virtual void | LateUpdate () |
Makes the object rotate on its center at LateUpdate More... | |
virtual void | Rotate () |
Rotates the object More... | |
Protected Attributes | |
Quaternion | _newRotation |
Vector3 | _desiredOrbitPosition |
Add this class to a GameObject to make it rotate on itself
|
strong |
|
protectedvirtual |
Makes the object rotate on its center at FixedUpdate
|
protectedvirtual |
Makes the object rotate on its center at LateUpdate
|
virtual |
Sets Orbiting to true or false
status |
|
protectedvirtual |
Rotates the object
|
virtual |
Sets Rotating to true or false
status |
|
protectedvirtual |
On start, we initialize our plane
|
protectedvirtual |
Makes the object rotate on its center at Update
|
protected |
|
protected |
Vector3 MoreMountains.Tools.MMAutoRotate._orbitCenter |
Vector3 MoreMountains.Tools.MMAutoRotate._radius |
Plane MoreMountains.Tools.MMAutoRotate._rotationPlane |
Vector3 MoreMountains.Tools.MMAutoRotate._snappedPosition |
Vector3 MoreMountains.Tools.MMAutoRotate._worldRotationAxis |
bool MoreMountains.Tools.MMAutoRotate.AdditiveOrbitRotation = false |
if this is true, the orbit plane will rotate along with the parent
bool MoreMountains.Tools.MMAutoRotate.DrawGizmos = true |
if this is true, will draw gizmos to show the plane, orbit and direction
Vector3 MoreMountains.Tools.MMAutoRotate.OrbitCenterOffset = Vector3.zero |
the pivot (relative to the object's position in local space) to rotate around
Transform MoreMountains.Tools.MMAutoRotate.OrbitCenterTransform |
the pivot to rotate around (if left blank, will be the object itself
float MoreMountains.Tools.MMAutoRotate.OrbitCorrectionSpeed = 10f |
the speed at which the object catches up when orbit radius or axis changes
bool MoreMountains.Tools.MMAutoRotate.Orbiting = false |
if this is true, the object will also move around a pivot (only the position is affected, not the rotation)
Color MoreMountains.Tools.MMAutoRotate.OrbitLineColor = new Color(225f, 225f, 225f, 0.1f) |
the color of the orbit line
Color MoreMountains.Tools.MMAutoRotate.OrbitPlaneColor = new Color(54f, 169f, 225f, 0.02f) |
the color of the orbit disc
float MoreMountains.Tools.MMAutoRotate.OrbitRadius = 3f |
the radius at which to orbit
Vector3 MoreMountains.Tools.MMAutoRotate.OrbitRotationAxis = new Vector3(0f, 1f, 0f) |
the axis around which the object should rotate (don't make it zero)
float MoreMountains.Tools.MMAutoRotate.OrbitRotationSpeed = 10f |
the speed at which to rotate
bool MoreMountains.Tools.MMAutoRotate.Rotating = true |
whether or not this object should be rotating right now
Space MoreMountains.Tools.MMAutoRotate.RotationSpace = Space.Self |
the space to apply the rotation in
Vector3 MoreMountains.Tools.MMAutoRotate.RotationSpeed = new Vector3(100f, 0f, 0f) |
The rotation speed. Positive means clockwise, negative means counter clockwise.
UpdateModes MoreMountains.Tools.MMAutoRotate.UpdateMode = UpdateModes.Update |
whether movement should happen at Update, FixedUpdate or LateUpdate