コード例 #1
0
    /// Get the velocity of a specific point on the rigid body as specified in world coords.
    public Vector2 VelocityAtWorldPoint(Vector2 position)
    {
        var offset = Vector2.Scale(_transform.InverseTransformPoint(position), _transform.localScale);

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