Jump to content

cigi entity's intersection


photo

Recommended Posts

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

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.

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

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

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.

  • Like 1
Link to comment

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
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

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.

  • Like 1
Link to comment
×
×
  • Create New...