Jump to content

IG Collision of version2.9


photo

Recommended Posts

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 by dongju.jeong
Link to comment

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.

image.png.553d7486919863e17e09d1875954df17.png

 

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 by dongju.jeong
Link to comment
×
×
  • Create New...