fabre.cedric Posted August 7, 2020 Share Posted August 7, 2020 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
silent Posted August 7, 2020 Share Posted August 7, 2020 Hi Fabre, Currently there is no way to use scaled objects in physics (they should have scale factor = 1.0). We are working on improved physics behavior with scale, but can't give you any valid ETA right now. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
fabre.cedric Posted August 7, 2020 Author Share Posted August 7, 2020 ... Is there a way to do polygons/polygons collision without physics in Unigine ? Link to comment
fabre.cedric Posted August 7, 2020 Author Share Posted August 7, 2020 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
silent Posted August 7, 2020 Share Posted August 7, 2020 Could you please tell us what kind of task do you want to solve with these objects? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
fabre.cedric Posted August 7, 2020 Author Share Posted August 7, 2020 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
silent Posted August 7, 2020 Share Posted August 7, 2020 For that use-case you don't need a physics intersection I guess. You can try to use object's bound box to detect the intersection and than use additional intersection ray to get the normals vector in required point. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
fabre.cedric Posted August 7, 2020 Author Share Posted August 7, 2020 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 ? Link to comment
fabre.cedric Posted May 26, 2021 Author Share Posted May 26, 2021 Hello, Can we finally resize mesh with shape convex now ? Or maybe there is another way to do this ? Thanks Link to comment
silent Posted May 26, 2021 Share Posted May 26, 2021 Hi Fabre, Not really, you still need to have 1.0 mesh scale in order to use physics correctly. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts