How to check a collision

Hi, i’m new to Xenko, and i want to know why i can check a collision between an object that has a rigidboy and an object that has a static collider.

Thanks :wink:

Thank you all for the 100+ answers i got for this thread ;(

Since we lack documentation the best is to check samples, in this case the VolumeTrigger sample holds the answer. E.g.:

 var trigger = Entity.Get<PhysicsComponent>()[0].Collider;
 
 //start out state machine
 while (Game.IsRunning)
 {
     //wait for entities coming in
     await trigger.FirstCollision();
 
     SimpleMessage.OnStart();
 
     //now wait for entities exiting
     await trigger.AllCollisionsEnded();
 
     SimpleMessage.OnStop();
 }

You can await various states: FirstCollision, NewCollision, CollisionEnded, AllCollisionsEnded