Пример #1
0
    protected void UpdateVerts()
    {
        if (_handle != IntPtr.Zero)
        {
            var transformed = MakeVerts();
            CP.UpdateConvexPolyShapeWithVerts(_handle, transformed.Length, transformed);
            CP.cpPolyShapeSetRadius(_handle, _maxScale * _radius);
            CP.cpSpaceReindexShape(space._handle, _handle);

            if (body)
            {
                body.Activate();
            }
        }
    }