Jump to content

Scale object with ShapeConvex


photo

Recommended Posts

Hello, 

Could you explain how to scale object after assigning a rigidbody and a convex shape ?

The object and the "shape in visualizer" have the right size but the collision take the first size of the object ?

 

Unigine::BodyPtr body = Unigine::Body::createBody(0);
Unigine::ShapePtr shapeConvex = Unigine::ShapeConvex::create(myObj, -1);
body->addShape(shapeConvex);
myObj->setBody(body, true);

and later if I write myObj->setWorldScale(Unigine::Math::Vec3(scaleX, scaleY, scaleZ));

Object and shape in visualizer are right but the collision take the first size of object...


Thanks.

Link to comment

Or maybe a way to get the oriented bounding box ?
I would like to align object to the wall and snapping to other object with right angle...

Link to comment

I move object with mouse and want to snap object with other "objects or walls" with the right angle to align them.

To align kitchen furnitures on a wall at 17 ° for example...

Link to comment

Yes this is possible with oriented bounding box I think...

If you have any idea to align the box on the wall and another box to the first box and the wall without oriented bounding box ?

boxtowall.png

Link to comment
  • 9 months later...
×
×
  • Create New...