Class RelativeVelocityRigidbodyTracking
Component to track an object's displacement and rotation during an update. Also have a scaling factor based on player's relative velocity. This will fully attach for relative speeds below the minimum relative velocity and fully detach players for velocities over the maximum velocity threshold.
Implements
Inherited Members
Namespace: nickmaltbie.OpenKCC.Environment.MovingGround
Assembly: cs.temp.dll.dll
Syntax
public class RelativeVelocityRigidbodyTracking : RigidbodyMovingGround, IMovingGround
Methods
GetMovementWeight(Vector3, Vector3)
Get the weight of movement for a given player's velocity at a given point.
Declaration
public override float GetMovementWeight(Vector3 point, Vector3 playerVelocity)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | Point where player is standing on the object. |
Vector3 | playerVelocity | Velocity of the player. |
Returns
Type | Description |
---|---|
Single | Weight of player's attachment to the object given these parameters. Will be between 0 (not attached at all) and 1 (fully attached). |