Class KCCMovementEngineWithPush
Basic extension of KCCMovementEngine that allows for pushing rigidbody objects that it collides with that have the attached MonoBehaviour IPushable.
Inherited Members
Namespace: nickmaltbie.OpenKCC.Character
Assembly: cs.temp.dll.dll
Syntax
public class KCCMovementEngineWithPush : KCCMovementEngine, IKCCConfig, ICharacterPush
Fields
pushDecay
Decay in momentum when pushing an object. Zero indicates all momentum is lost while 1 indicates all momentum is maintained.
Declaration
public float pushDecay
Field Value
Type | Description |
---|---|
Single |
pushPower
Power of the player push.
Declaration
public float pushPower
Field Value
Type | Description |
---|---|
Single |
Methods
CanPushObject(Collider)
Can this character push objects.
Declaration
public bool CanPushObject(Collider hit)
Parameters
Type | Name | Description |
---|---|---|
Collider | hit |
Returns
Type | Description |
---|---|
Boolean | Can this chanter push objects. |
GetMovement(Vector3)
Get the bounces for a KCC Utils movement action with a set default behaviour.
Declaration
public override IEnumerable<KCCBounce> GetMovement(Vector3 movement)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | movement | Movement to move the player. |
Returns
Type | Description |
---|---|
IEnumerable<KCCBounce> | Bounces that the player makes when hitting objects as part of it's movement. |
Overrides
PushObject(IControllerColliderHit)
Push an object using a IControllerColliderHit data.
Declaration
public void PushObject(IControllerColliderHit hit)
Parameters
Type | Name | Description |
---|---|---|
IControllerColliderHit | hit | Data about how the character controller hit the object. |