How to change the size of the body of the Farcer, along with his joints and associated bodies?

I use FarSeer and XNA.

Is there an easy way to resize or scale the FarSeer body?

Thanks.

+3
source share
1 answer

I was looking for a solution to this and stumbled upon your thread in the official forum. Here's what I could collect by looking at official forum posts and the Farseer source code:

When using the factory body, the width / height / radius parameters are supplied to calculate the moment of inertia. The body class itself has no fields or width and height properties.

I think what you are looking for is how to resize the geometry, which is important in collision detection.

Geom (, ) //. , . geom :

    /// <summary>
    /// Sets the vertices of the geom.
    /// </summary>
    /// <param name="vertices">The vertices.</param>
    public void SetVertices(Vertices vertices)
    {
        vertices.ForceCounterClockWiseOrder();
        localVertices = new Vertices(vertices);
        worldVertices = new Vertices(vertices);

        AABB.Update(ref vertices);
    }

. , , .

0

Source: https://habr.com/ru/post/1726004/


All Articles