Regarding monitoring the coincidence of two rigid bodies


I am currently controlling the movement of this character, and I want to monitor the callback when this character reaches the middle of this cylinder
Instead of triggering it upon touching this cylinder,
I am trying to monitor the coincidence of these two objects

this.entity.collision.on(‘collisionstart’, this.onCollisionStart, this);
this.entity.collision.on(‘triggerenter’, this.onTriggerEnter, this);

I found that collision start can only listen after adding RIGIDBODY to the cylinder, but the effect I want is to walk inside the cylinder instead of outside

You should use the events “triggerenter” and “triggerleave” instead. If you want it to detect when the player reaches the center and not the entire volume of the cylindar, you can change the cylindar’s radius to a smaller number like 0.05.

1 Like

Thank you very much. I did the same

1 Like