Add this class to a GameObject to make it rotate on itself
More...
|
virtual void | Rotate (bool status) |
| Sets Rotating to true or false More...
|
|
virtual void | Orbit (bool status) |
| Sets Orbiting to true or false More...
|
|
|
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 |
|
|
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...
|
|
Add this class to a GameObject to make it rotate on itself
◆ UpdateModes
Enumerator |
---|
Update | |
LateUpdate | |
FixedUpdate | |
◆ FixedUpdate()
virtual void MoreMountains.Tools.MMAutoRotate.FixedUpdate |
( |
| ) |
|
|
protectedvirtual |
Makes the object rotate on its center at FixedUpdate
◆ LateUpdate()
virtual void MoreMountains.Tools.MMAutoRotate.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
Makes the object rotate on its center at LateUpdate
◆ Orbit()
virtual void MoreMountains.Tools.MMAutoRotate.Orbit |
( |
bool |
status | ) |
|
|
virtual |
Sets Orbiting to true or false
- Parameters
-
◆ Rotate() [1/2]
virtual void MoreMountains.Tools.MMAutoRotate.Rotate |
( |
| ) |
|
|
protectedvirtual |
◆ Rotate() [2/2]
virtual void MoreMountains.Tools.MMAutoRotate.Rotate |
( |
bool |
status | ) |
|
|
virtual |
Sets Rotating to true or false
- Parameters
-
◆ Start()
virtual void MoreMountains.Tools.MMAutoRotate.Start |
( |
| ) |
|
|
protectedvirtual |
On start, we initialize our plane
◆ Update()
virtual void MoreMountains.Tools.MMAutoRotate.Update |
( |
| ) |
|
|
protectedvirtual |
Makes the object rotate on its center at Update
◆ _desiredOrbitPosition
Vector3 MoreMountains.Tools.MMAutoRotate._desiredOrbitPosition |
|
protected |
◆ _newRotation
Quaternion MoreMountains.Tools.MMAutoRotate._newRotation |
|
protected |
◆ _orbitCenter
Vector3 MoreMountains.Tools.MMAutoRotate._orbitCenter |
◆ _radius
Vector3 MoreMountains.Tools.MMAutoRotate._radius |
◆ _rotationPlane
Plane MoreMountains.Tools.MMAutoRotate._rotationPlane |
◆ _snappedPosition
Vector3 MoreMountains.Tools.MMAutoRotate._snappedPosition |
◆ _worldRotationAxis
Vector3 MoreMountains.Tools.MMAutoRotate._worldRotationAxis |
◆ AdditiveOrbitRotation
bool MoreMountains.Tools.MMAutoRotate.AdditiveOrbitRotation = false |
if this is true, the orbit plane will rotate along with the parent
◆ DrawGizmos
bool MoreMountains.Tools.MMAutoRotate.DrawGizmos = true |
if this is true, will draw gizmos to show the plane, orbit and direction
◆ OrbitCenterOffset
Vector3 MoreMountains.Tools.MMAutoRotate.OrbitCenterOffset = Vector3.zero |
the pivot (relative to the object's position in local space) to rotate around
◆ OrbitCenterTransform
Transform MoreMountains.Tools.MMAutoRotate.OrbitCenterTransform |
the pivot to rotate around (if left blank, will be the object itself
◆ OrbitCorrectionSpeed
float MoreMountains.Tools.MMAutoRotate.OrbitCorrectionSpeed = 10f |
the speed at which the object catches up when orbit radius or axis changes
◆ Orbiting
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)
◆ OrbitLineColor
Color MoreMountains.Tools.MMAutoRotate.OrbitLineColor = new Color(225f, 225f, 225f, 0.1f) |
the color of the orbit line
◆ OrbitPlaneColor
Color MoreMountains.Tools.MMAutoRotate.OrbitPlaneColor = new Color(54f, 169f, 225f, 0.02f) |
the color of the orbit disc
◆ OrbitRadius
float MoreMountains.Tools.MMAutoRotate.OrbitRadius = 3f |
the radius at which to orbit
◆ OrbitRotationAxis
Vector3 MoreMountains.Tools.MMAutoRotate.OrbitRotationAxis = new Vector3(0f, 1f, 0f) |
the axis around which the object should rotate (don't make it zero)
◆ OrbitRotationSpeed
float MoreMountains.Tools.MMAutoRotate.OrbitRotationSpeed = 10f |
the speed at which to rotate
◆ Rotating
bool MoreMountains.Tools.MMAutoRotate.Rotating = true |
whether or not this object should be rotating right now
◆ RotationSpace
Space MoreMountains.Tools.MMAutoRotate.RotationSpace = Space.Self |
the space to apply the rotation in
◆ RotationSpeed
Vector3 MoreMountains.Tools.MMAutoRotate.RotationSpeed = new Vector3(100f, 0f, 0f) |
The rotation speed. Positive means clockwise, negative means counter clockwise.
◆ UpdateMode
whether movement should happen at Update, FixedUpdate or LateUpdate
The documentation for this class was generated from the following file:
- E:/Github/Store/TopDownEngine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMTools/Accessories/MMMovement/MMAutoRotate.cs