Class ControllerBody2D
The base class for high performance physics controller that uses Unity's Low Level Physics2D system to allow for
highly customizable physics that can even destroy, edit, and manipulate physics shapes in real time.
Inheritance
System.Object
ControllerBody2D
Assembly: cs.temp.dll.dll
Syntax
public class ControllerBody2D : PhysicController2D, IForceReceiver
Remarks
Fields
_character
Declaration
protected CharacterRenderer2D _character
Field Value
CharacterState
Declaration
public CharacterState CharacterState
Field Value
CollisionInfo
Declaration
public BodyCollisionInfo CollisionInfo
Field Value
DebugMode
Should the debug rendering and log system be active.
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
Remarks
IsCrouching
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
IsFalling
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
IsGliding
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
IsJumping
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
IsRunning
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
IsSwimming
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
ShapeComponent
The SFShapeComponent that is defining the physics shape and physics body of the controller.
Declaration
public SFShapeComponent ShapeComponent
Field Value
Properties
IsClimbing
Declaration
public bool IsClimbing { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Methods
CalculateHorizontal()
Declaration
protected override void CalculateHorizontal()
Overrides
CalculateMovementState()
Declaration
protected override void CalculateMovementState()
Overrides
CalculateVertical()
Declaration
protected override void CalculateVertical()
Overrides
FixedUpdate()
Declaration
protected override void FixedUpdate()
Overrides
Move()
Declaration
protected override void Move()
Overrides
OnAwake()
Declaration
protected override void OnAwake()
Overrides
ResetColliderSize()
Declaration
public void ResetColliderSize()
ResetPhysics(MovementProperties)
Declaration
public virtual void ResetPhysics(MovementProperties movementProperties)
Parameters
ResizeCollider(Vector2)
Declaration
public void ResizeCollider(Vector2 newSize)
Parameters
| Type |
Name |
Description |
| Vector2 |
newSize |
|
UpdatePhysicsProperties(MovementProperties, PhysicsVolumeType)
Declaration
public virtual void UpdatePhysicsProperties(MovementProperties movementProperties, PhysicsVolumeType volumeType = PhysicsVolumeType.None)
Parameters
Implements