dongju.jeong Posted May 22, 2019 Share Posted May 22, 2019 using physical trigger, Is it impossible to check surface collision for object that made by cigi entity packet.? I put a physical trigger on the fingertips of my hand model. And I made an entity object using entity packet and checked surface collision of entity by hand model, but it did not collide. How do I make collision check possible for objects made by entity packet? Link to comment
morbid Posted May 22, 2019 Share Posted May 22, 2019 Hello Dongju, Have you checked physical trigger interaction with another collider object? The physical trigger requires a physical shape assigned for the object you want to collide with: To be detected by the trigger, a physical object must have both a physical body (with the physical mask that matches the physical mask of the trigger) and a shape (with the collision mask that matches the collision mask of the trigger). https://developer.unigine.com/en/docs/2.8/objects/effects/physicals/physical_trigger/ I suggest checking your solution with triggers on a simple object, then debug it with CIGI entity. Thanks. 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 May 23, 2019 Author Share Posted May 23, 2019 Is this a bug if the collision check is successful with an object without body and shape? I checked by this way for (int i = 0; i < trigger->getNumContacts(); i++) { ....(using "trigger->getContactPoint(i)") } trigger->updateContacts(); It works by checking objects created in the editor.However, the same object created using entity packets does not work. Link to comment
cash-metall Posted May 23, 2019 Share Posted May 23, 2019 1. in ig_template physic shutdown by default. int AppWorldLogic::init() { // init systems, do some optimizations for IG Game::get()->setEnabled(1); // Physics::get()->setEnabled(0); //remove this, or set 1 Render::get()->setMotionBlur(0); Render::get()->setLightsLensFlares(0); return 1; } 2. add BodyDummy and any Shape in NodeReference. 3. check that all collision masks on Body & Shape are configured correctly 4. in HEMU set Enable Collision Detected for your entity Enabling physics can lead to performance drops. Do you really need to use the physical trigger? It may be better to try to take the intersection forward of the hand. 1 Link to comment
dongju.jeong Posted May 23, 2019 Author Share Posted May 23, 2019 If I enable the Collision Detection option even if there is no body or shape in the Nodreference, the trigger->getNumContacts() function and the trigger->getContactPoint(i) function is operate. Is it right action? but this is what I want. Link to comment
cash-metall Posted May 23, 2019 Share Posted May 23, 2019 1 hour ago, dongju.jeong said: If I enable the Collision Detection option even if there is no body or shape in the Nodreference, the trigger->getNumContacts() function and the trigger->getContactPoint(i) function is operate. No, physical trigger can work only with body & shape. 3 hours ago, dongju.jeong said: Is this a bug if the collision check is successful with an object without body and shape? collision checking works with surface, but the physical trigger does not react to the mesh. Link to comment
cash-metall Posted May 23, 2019 Share Posted May 23, 2019 I misunderstood you. Indeed, getContact in flush() returns contact points, but the trigger`s callback does not work. It's not a mistake. Collisions work correctly, I checked this case. You can use this if you don't need callbacks. 1 Link to comment
Recommended Posts