dongju.jeong Posted April 17, 2020 Share Posted April 17, 2020 (edited) In 2.9 you can workaround this manually handling these collisions to get a callback: Vector<ContactPtr> contacts; int res = shape->getCollision(contacts,0); if (res ) for (auto & it : contacts) { //.. dosmth } It works when using only unigine engines. (create object in world using editor and translate by unigine code) However, when tested as IG through my Host, it does not work even if it hits the terrain and other object( not created as entity. but surface collision enable or have physics body). Also, IG did not send a Collision response to the host. That code worked and collision response packets were sent only when objects made as entities were in contact with each other. I want the collision response to be sent when my created entity touches an object or terrain that is not an entity, and at the same time I want to access the collision callback in Unigine engine. How should I work? This is an important issue for me. Edited April 17, 2020 by dongju.jeong Link to comment
morbid Posted April 17, 2020 Share Posted April 17, 2020 Sorry, I forgot to mention that in 2.9 you need a specific mask to work with terrain collision. Set terrain collision mask to 10: 1 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
dongju.jeong Posted April 17, 2020 Author Share Posted April 17, 2020 (edited) thank you. code is work. However, an error occurs in the IG dll when it collides with the terrain. host sends a packet that enabled the collide option of the entity packet. It is okay when entities collide each others. (code work, collision response work) also collide with object fine.(not entity) but didn't send collision response in this case. I think this ploblem is about collision response. Edited April 18, 2020 by dongju.jeong Link to comment
Recommended Posts