Пример #1
0
    /// Get the velocity of a specific point on the rigid body as specified in the transform's local coords.
    public Vector2 VelocityAtLocalPoint(Vector2 localPosition)
    {
        var offset = Vector2.Scale(localPosition, _transform.localScale);

        return(_handle != IntPtr.Zero ? CP.cpBodyGetVelAtLocalPoint(_handle, offset) : Vector2.zero);
    }