marin.komendanovic Posted May 12, 2020 Share Posted May 12, 2020 So I created new project and modified my code to look like in your example, https://developer.unigine.com/en/docs/2.11/code/usage/car_suspension_joints/index?rlang=cpp I have issue with wheel join as they dont seem to have collision detection enabled for some odd reason, anyone knows how to fix this issue? Thanks! Link to comment
marin.komendanovic Posted May 12, 2020 Author Share Posted May 12, 2020 Ive been trying to adjust wheel position to be higher, I was changing "car" shape dimensions, weight. Nothing worked. Link to comment
fox Posted May 12, 2020 Share Posted May 12, 2020 Hi Marin, Seems like one thing is missing in the example code - enabling physics intersection for the ground (by default it is disabled). Try replacing the following lines in the AppWorldLogic::init() method: if (ground) checked_ptr_cast<Object>(ground)->setCollision(1, 0); with these: if (ground) { checked_ptr_cast<Object>(ground)->setCollision(1, 0); checked_ptr_cast<Object>(ground)->setPhysicsIntersection(1, 0); } Or you can enable the PhysicsIntersection option for the ground's surface via the UnigineEditor. This should solve your problem. Well update the docs ASAP, sorry for the inconvenience caused! Thanks! 2 Link to comment
marin.komendanovic Posted May 12, 2020 Author Share Posted May 12, 2020 13 hours ago, fox said: Hi Marin, Seems like one thing is missing in the example code - enabling physics intersection for the ground (by default it is disabled). Try replacing the following lines in the AppWorldLogic::init() method: if (ground) checked_ptr_cast<Object>(ground)->setCollision(1, 0); with these: if (ground) { checked_ptr_cast<Object>(ground)->setCollision(1, 0); checked_ptr_cast<Object>(ground)->setPhysicsIntersection(1, 0); } Or you can enable the PhysicsIntersection option for the ground's surface via the UnigineEditor. This should solve your problem. Well update the docs ASAP, sorry for the inconvenience caused! Thanks! Thanks, that was it. I eventually went back in the Unigine Editor and enabled physics for the "ground" Link to comment
samuel.bruner Posted May 12, 2020 Share Posted May 12, 2020 (edited) I tried everything except the physics intersection... But finaly it work, not made by code but with editor, notice how you have to set up axis 00,01,11 to make the wheels stay in the good axis. also i set other parameters like in the code, i added a bit more of spring because the car is heavier Edited May 12, 2020 by samuel.bruner Link to comment
Recommended Posts