Search Results for

    Show / Hide Table of Contents

    Interface IMovingGround

    Moving ground object that a player can move along with

    Namespace: nickmaltbie.OpenKCC.Environment.MovingGround
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IMovingGround

    Methods

    AvoidTransferMomentum()

    Should momentum be transferred to players when they leave this object.

    Declaration
    bool AvoidTransferMomentum()
    Returns
    Type Description
    Boolean

    GetMovementWeight(Vector3, Vector3)

    Get the weight of movement for a given player's velocity at a given point.

    Declaration
    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).

    GetTransferMomentumWeight(Vector3, Vector3)

    Get the weight of movement of transfering momentum when a player leaves this object

    Declaration
    float GetTransferMomentumWeight(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

    How much relative velocity teh player should retain when departing from the surface of this object via jump or fall.

    GetVelocityAtPoint(Vector3)

    Get the velocity (in units per second) that the object is moving at a given point on the surface of the object (in world space).

    Declaration
    Vector3 GetVelocityAtPoint(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    Point on the surface of the object (in world space).

    Returns
    Type Description
    Vector3

    Velocity that the object is moving at the point.

    ShouldAttach()

    When following this object, should the player attach themselves to the object to follow it properly? This is important for rapidly moving objects. Additionally, if the object does not move but wants to push the player (such as a conveyer belt), then players should definitely not attach to the object.

    Declaration
    bool ShouldAttach()
    Returns
    Type Description
    Boolean
    In This Article
    Back to top OpenKCC Documentation