[SOLVED] Collision triggers and rotation

Hello, I have a problem with collision triggers.

I have main entity which contains a lot of platforms with collision triggers.

The problem is that when I rotate that main entity,

the meshes are correcly rotated, but their collision trigger space remains fixed.

Here is a demo: https://launch.playcanvas.com/751420?debug=true

The browser console displays always the name of the original platform,

regardless of being rotated by the main entity.

Is there a way to rotate the main entity and make the collision trigger

of their children rotate as well?


You use a static rigid body? If yes, then try to set for all the elements a kinematic rigid body. In this case, the collision will move behind the model.

Hello, thanks for the answer.
The platforms have a collision component, but not rigidbody. The ball has both.
I’m using collision triggers.

playcanvas doesnt have triggers making it kinematic may solve your problem considering since the platform is called static the collision wont move with platforms… in the end you can add a new collision without a rigidbody to call something when the ball hits it.

Solved by adding RigidBody to the platform and using ‘oncontact’ event.
Thanks for the help

1 Like