Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsVelocity3

    Extension methods to get the velocity at which an object is travelling along all three axes. Methods without a delta time value will use Time.deltaTime. Any Vector2 values will be expanded via the Expand(Vector2) method.

    Inheritance
    System.Object
    KaijuAgentsVelocity3
    Namespace: KaijuSolutions.Agents.Extensions
    Syntax
    public static class KaijuAgentsVelocity3

    Methods

    Velocity3(Component, Component)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Component previous)
    Parameters
    Type Name Description
    Component current

    The current position.

    Component previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Component, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Component previous, float delta)
    Parameters
    Type Name Description
    Component current

    The current position.

    Component previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, GameObject)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, GameObject previous)
    Parameters
    Type Name Description
    Component current

    The current position.

    GameObject previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, GameObject, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, GameObject previous, float delta)
    Parameters
    Type Name Description
    Component current

    The current position.

    GameObject previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Transform)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Transform previous)
    Parameters
    Type Name Description
    Component current

    The current position.

    Transform previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Transform, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Transform previous, float delta)
    Parameters
    Type Name Description
    Component current

    The current position.

    Transform previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Vector2)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Vector2 previous)
    Parameters
    Type Name Description
    Component current

    The current position.

    Vector2 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Vector2, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Vector2 previous, float delta)
    Parameters
    Type Name Description
    Component current

    The current position.

    Vector2 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Vector3)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Vector3 previous)
    Parameters
    Type Name Description
    Component current

    The current position.

    Vector3 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Component, Vector3, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Component current, Vector3 previous, float delta)
    Parameters
    Type Name Description
    Component current

    The current position.

    Vector3 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Component)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Component previous)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Component previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Component, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Component previous, float delta)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Component previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, GameObject)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, GameObject previous)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    GameObject previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, GameObject, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, GameObject previous, float delta)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    GameObject previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Transform)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Transform previous)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Transform previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Transform, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Transform previous, float delta)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Transform previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Vector2)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Vector2 previous)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Vector2 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Vector2, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Vector2 previous, float delta)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Vector2 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Vector3)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Vector3 previous)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Vector3 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(GameObject, Vector3, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this GameObject current, Vector3 previous, float delta)
    Parameters
    Type Name Description
    GameObject current

    The current position.

    Vector3 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Component)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Component previous)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Component previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Component, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Component previous, float delta)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Component previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, GameObject)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, GameObject previous)
    Parameters
    Type Name Description
    Transform current

    The current position.

    GameObject previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, GameObject, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, GameObject previous, float delta)
    Parameters
    Type Name Description
    Transform current

    The current position.

    GameObject previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Transform)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Transform previous)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Transform previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Transform, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Transform previous, float delta)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Transform previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Vector2)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Vector2 previous)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Vector2 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Vector2, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Vector2 previous, float delta)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Vector2 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Vector3)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Vector3 previous)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Vector3 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Transform, Vector3, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Transform current, Vector3 previous, float delta)
    Parameters
    Type Name Description
    Transform current

    The current position.

    Vector3 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Component)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Component previous)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Component previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Component, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Component previous, float delta)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Component previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, GameObject)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, GameObject previous)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    GameObject previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, GameObject, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, GameObject previous, float delta)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    GameObject previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Transform)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Transform previous)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Transform previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Transform, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Transform previous, float delta)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Transform previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Vector2)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Vector2 previous)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Vector2 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Vector2, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Vector2 previous, float delta)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Vector2 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Vector3)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Vector3 previous)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Vector3 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector2, Vector3, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector2 current, Vector3 previous, float delta)
    Parameters
    Type Name Description
    Vector2 current

    The current position.

    Vector3 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Component)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Component previous)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Component previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Component, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Component previous, float delta)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Component previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, GameObject)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, GameObject previous)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    GameObject previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, GameObject, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, GameObject previous, float delta)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    GameObject previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Transform)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Transform previous)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Transform previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Transform, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Transform previous, float delta)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Transform previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Vector2)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Vector2 previous)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Vector2 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Vector2, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Vector2 previous, float delta)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Vector2 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Vector3)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Vector3 previous)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Vector3 previous

    The previous position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    Velocity3(Vector3, Vector3, Single)

    The current velocity based on the time it took to move from a previous position.

    Declaration
    public static Vector3 Velocity3(this Vector3 current, Vector3 previous, float delta)
    Parameters
    Type Name Description
    Vector3 current

    The current position.

    Vector3 previous

    The previous position.

    System.Single delta

    The time since the last position.

    Returns
    Type Description
    Vector3

    The current speed based on the time it took to move from a previous position.

    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.