[SOLVED] Collision Event is not triggered

(PlayCanvas 3D HTML5 Game Engine)

In the above example, when launched. click any point to create a green cube.
Then if you move around the mouse, it will create the red cube trails. All these red cubes are supposed
create collision triggered against the yellow wall.
But not the case.

Any help will be appreciated.

-s

Hi @lenvanthis!

Please note that a trigger entity should not have a rigidbody component. If the entity has a rigidbody component you need to use the oncollisionstart event instead of the ontriggerenter event. Please also note that a trigger is not activated by a static rigidbody and a static rigidbody should not be moved.

1 Like

@Albertos Thanks for the comment. I have updated the code based on your comment. It works!! Awesome!

1 Like