Do not use this class directly, use TopDownController2D for 2D characters, or TopDownController3D for 3D characters Both of these classes inherit from this one.
More...
|
| virtual void | DetectObstacles (float distance, Vector3 offset) |
| | Performs obstacle detection "manually".
|
| virtual void | Impact (Vector3 direction, float force) |
| | Use this to apply an impact to a controller, moving it in the specified direction at the specified force.
|
| virtual void | SetGravityActive (bool status) |
| | Sets gravity active or inactive.
|
| virtual void | AddForce (Vector3 movement) |
| | Adds the specified force to the controller.
|
| virtual void | SetMovement (Vector3 movement) |
| | Sets the current movement of the controller to the specified Vector3.
|
| virtual void | MovePosition (Vector3 newPosition, bool targetTransform=false) |
| | Moves the controller to the specified position (in world space)
|
| virtual void | ResizeColliderHeight (float newHeight, bool translateCenter=false) |
| | Resizes the controller's collider.
|
| virtual void | ResetColliderSize () |
| | Resets the controller's collider size.
|
| virtual bool | CanGoBackToOriginalSize () |
| | Returns true if the controller's collider can go back to original size without hitting an obstacle, false otherwise.
|
| virtual void | CollisionsOn () |
| | Turns the controller's collisions on.
|
| virtual void | CollisionsOff () |
| | Turns the controller's collisions off.
|
| virtual void | SetKinematic (bool state) |
| | Sets the controller's rigidbody to Kinematic (or not kinematic)
|
| virtual void | Reset () |
| | Resets all values for this controller.
|
|
| float | Gravity = 40f |
| | the current gravity to apply to our character (positive goes down, negative goes up, higher value, higher acceleration)
|
| bool | GravityActive = true |
| | whether or not the gravity is currently being applied to this character
|
| float | CrouchedRaycastLengthMultiplier = 1f |
| | by default, the length of the raycasts used to get back to normal size will be auto generated based on your character's normal/standing height, but here you can specify a different value
|
| bool | PerformCardinalObstacleRaycastDetection = false |
| | if this is true, extra raycasts will be cast on all 4 sides to detect obstacles and feed the CollidingWithCardinalObstacle bool, only useful when working with grid movement, or if you need that info for some reason
|
| Vector3 | Speed |
| | the current speed of the character
|
| Vector3 | Velocity |
| | the current velocity
|
| Vector3 | VelocityLastFrame |
| | the velocity of the character last frame
|
| Vector3 | Acceleration |
| | the current acceleration
|
| bool | Grounded |
| | whether or not the character is grounded
|
| bool | JustGotGrounded |
| | whether or not the character got grounded this frame
|
| Vector3 | CurrentMovement |
| | the current movement of the character
|
| Vector3 | CurrentDirection |
| | the direction the character is going in
|
| float | Friction |
| | the current friction
|
| Vector3 | AddedForce |
| | the current added force, to be added to the character's movement
|
| bool | FreeMovement = true |
| | whether or not the character is in free movement mode or not
|
|
| virtual void | Awake () |
| | On awake, we initialize our current direction.
|
| virtual void | Update () |
| | On update, we check if we're grounded, and determine the direction.
|
| virtual void | ComputeSpeed () |
| | Computes the speed.
|
| virtual void | DetermineDirection () |
| | Determines the controller's current direction.
|
| virtual void | FixedUpdate () |
| | Called at FixedUpdate.
|
| virtual void | LateUpdate () |
| | On LateUpdate, computes the speed of the agent.
|
| virtual void | CheckIfGrounded () |
| | Checks if the character is grounded.
|
| virtual void | HandleFriction () |
| | Handles friction collisions.
|
Do not use this class directly, use TopDownController2D for 2D characters, or TopDownController3D for 3D characters Both of these classes inherit from this one.
◆ AddForce()
| virtual void MoreMountains.TopDownEngine.TopDownController.AddForce |
( |
Vector3 | movement | ) |
|
|
virtual |
◆ Awake()
| virtual void MoreMountains.TopDownEngine.TopDownController.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ CanGoBackToOriginalSize()
| virtual bool MoreMountains.TopDownEngine.TopDownController.CanGoBackToOriginalSize |
( |
| ) |
|
|
virtual |
◆ CheckIfGrounded()
| virtual void MoreMountains.TopDownEngine.TopDownController.CheckIfGrounded |
( |
| ) |
|
|
protectedvirtual |
◆ CollisionsOff()
| virtual void MoreMountains.TopDownEngine.TopDownController.CollisionsOff |
( |
| ) |
|
|
virtual |
◆ CollisionsOn()
| virtual void MoreMountains.TopDownEngine.TopDownController.CollisionsOn |
( |
| ) |
|
|
virtual |
◆ ComputeSpeed()
| virtual void MoreMountains.TopDownEngine.TopDownController.ComputeSpeed |
( |
| ) |
|
|
protectedvirtual |
◆ DetectObstacles()
| virtual void MoreMountains.TopDownEngine.TopDownController.DetectObstacles |
( |
float | distance, |
|
|
Vector3 | offset ) |
|
virtual |
◆ DetermineDirection()
| virtual void MoreMountains.TopDownEngine.TopDownController.DetermineDirection |
( |
| ) |
|
|
protectedvirtual |
◆ FixedUpdate()
| virtual void MoreMountains.TopDownEngine.TopDownController.FixedUpdate |
( |
| ) |
|
|
protectedvirtual |
◆ HandleFriction()
| virtual void MoreMountains.TopDownEngine.TopDownController.HandleFriction |
( |
| ) |
|
|
protectedvirtual |
◆ Impact()
| virtual void MoreMountains.TopDownEngine.TopDownController.Impact |
( |
Vector3 | direction, |
|
|
float | force ) |
|
virtual |
◆ LateUpdate()
| virtual void MoreMountains.TopDownEngine.TopDownController.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
◆ MovePosition()
| virtual void MoreMountains.TopDownEngine.TopDownController.MovePosition |
( |
Vector3 | newPosition, |
|
|
bool | targetTransform = false ) |
|
virtual |
◆ Reset()
| virtual void MoreMountains.TopDownEngine.TopDownController.Reset |
( |
| ) |
|
|
virtual |
◆ ResetColliderSize()
| virtual void MoreMountains.TopDownEngine.TopDownController.ResetColliderSize |
( |
| ) |
|
|
virtual |
◆ ResizeColliderHeight()
| virtual void MoreMountains.TopDownEngine.TopDownController.ResizeColliderHeight |
( |
float | newHeight, |
|
|
bool | translateCenter = false ) |
|
virtual |
◆ SetGravityActive()
| virtual void MoreMountains.TopDownEngine.TopDownController.SetGravityActive |
( |
bool | status | ) |
|
|
virtual |
Sets gravity active or inactive.
- Parameters
-
◆ SetKinematic()
| virtual void MoreMountains.TopDownEngine.TopDownController.SetKinematic |
( |
bool | state | ) |
|
|
virtual |
◆ SetMovement()
| virtual void MoreMountains.TopDownEngine.TopDownController.SetMovement |
( |
Vector3 | movement | ) |
|
|
virtual |
◆ Update()
| virtual void MoreMountains.TopDownEngine.TopDownController.Update |
( |
| ) |
|
|
protectedvirtual |
◆ _groundedLastFrame
| bool MoreMountains.TopDownEngine.TopDownController._groundedLastFrame |
|
protected |
◆ _impact
| Vector3 MoreMountains.TopDownEngine.TopDownController._impact |
|
protected |
◆ _positionLastFrame
| Vector3 MoreMountains.TopDownEngine.TopDownController._positionLastFrame |
|
protected |
◆ _smallValue
| const float MoreMountains.TopDownEngine.TopDownController._smallValue =0.0001f |
|
staticprotected |
◆ _speedComputation
| Vector3 MoreMountains.TopDownEngine.TopDownController._speedComputation |
|
protected |
◆ Acceleration
| Vector3 MoreMountains.TopDownEngine.TopDownController.Acceleration |
◆ AddedForce
| Vector3 MoreMountains.TopDownEngine.TopDownController.AddedForce |
the current added force, to be added to the character's movement
◆ CrouchedRaycastLengthMultiplier
| float MoreMountains.TopDownEngine.TopDownController.CrouchedRaycastLengthMultiplier = 1f |
by default, the length of the raycasts used to get back to normal size will be auto generated based on your character's normal/standing height, but here you can specify a different value
◆ CurrentDirection
| Vector3 MoreMountains.TopDownEngine.TopDownController.CurrentDirection |
the direction the character is going in
◆ CurrentMovement
| Vector3 MoreMountains.TopDownEngine.TopDownController.CurrentMovement |
the current movement of the character
◆ FreeMovement
| bool MoreMountains.TopDownEngine.TopDownController.FreeMovement = true |
whether or not the character is in free movement mode or not
◆ Friction
| float MoreMountains.TopDownEngine.TopDownController.Friction |
◆ Gravity
| float MoreMountains.TopDownEngine.TopDownController.Gravity = 40f |
the current gravity to apply to our character (positive goes down, negative goes up, higher value, higher acceleration)
◆ GravityActive
| bool MoreMountains.TopDownEngine.TopDownController.GravityActive = true |
whether or not the gravity is currently being applied to this character
◆ Grounded
| bool MoreMountains.TopDownEngine.TopDownController.Grounded |
whether or not the character is grounded
◆ JustGotGrounded
| bool MoreMountains.TopDownEngine.TopDownController.JustGotGrounded |
whether or not the character got grounded this frame
◆ PerformCardinalObstacleRaycastDetection
| bool MoreMountains.TopDownEngine.TopDownController.PerformCardinalObstacleRaycastDetection = false |
if this is true, extra raycasts will be cast on all 4 sides to detect obstacles and feed the CollidingWithCardinalObstacle bool, only useful when working with grid movement, or if you need that info for some reason
◆ Speed
| Vector3 MoreMountains.TopDownEngine.TopDownController.Speed |
the current speed of the character
◆ Velocity
| Vector3 MoreMountains.TopDownEngine.TopDownController.Velocity |
◆ VelocityLastFrame
| Vector3 MoreMountains.TopDownEngine.TopDownController.VelocityLastFrame |
the velocity of the character last frame
◆ AppliedImpact
| virtual Vector3 MoreMountains.TopDownEngine.TopDownController.AppliedImpact |
|
get |
◆ ColliderBottom
| virtual Vector3 MoreMountains.TopDownEngine.TopDownController.ColliderBottom |
|
get |
the collider's bottom coordinates
◆ ColliderCenter
| virtual Vector3 MoreMountains.TopDownEngine.TopDownController.ColliderCenter |
|
get |
the collider's center coordinates
◆ ColliderTop
| virtual Vector3 MoreMountains.TopDownEngine.TopDownController.ColliderTop |
|
get |
the collider's top coordinates
◆ CollidingWithCardinalObstacle
| virtual bool MoreMountains.TopDownEngine.TopDownController.CollidingWithCardinalObstacle |
|
getset |
◆ DetectedObstacleDown
| virtual GameObject MoreMountains.TopDownEngine.TopDownController.DetectedObstacleDown |
|
getset |
◆ DetectedObstacleLeft
| virtual GameObject MoreMountains.TopDownEngine.TopDownController.DetectedObstacleLeft |
|
getset |
◆ DetectedObstacleRight
| virtual GameObject MoreMountains.TopDownEngine.TopDownController.DetectedObstacleRight |
|
getset |
◆ DetectedObstacleUp
| virtual GameObject MoreMountains.TopDownEngine.TopDownController.DetectedObstacleUp |
|
getset |
◆ MovingPlatformSpeed
| virtual Vector3 MoreMountains.TopDownEngine.TopDownController.MovingPlatformSpeed |
|
getset |
the speed of the moving platform
◆ ObjectBelow
| virtual GameObject MoreMountains.TopDownEngine.TopDownController.ObjectBelow |
|
getset |
the object (if any) below our character
◆ OnAMovingPlatform
| virtual bool MoreMountains.TopDownEngine.TopDownController.OnAMovingPlatform |
|
getset |
whether or not the character is on a moving platform
◆ SurfaceModifierBelow
| virtual SurfaceModifier MoreMountains.TopDownEngine.TopDownController.SurfaceModifierBelow |
|
getset |
the surface modifier object below our character (if any)
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/Core/TopDownController.cs