[SOLVED] Collectable trigger not working on android

Issue is not there while trying on pc…

image

image

Okay so I if I hold the play button for a while and then release it, the collectable is getting triggered sometimes. In case if I just quickly click it then the trigger does not work at all. How could we fix this issue?

Hi @yash_mehrotra! I see you move the trigger entity by script? Please note that a trigger is not activated by an entity with a static rigidbody. If you share a link to your project someone can take a look.

@Albertos Here please have a look.

https://playcanvas.com/editor/scene/1429896

It’s hard to test your game because it doesn’t really work as I expect. I see you use a mesh collider on your Bird entity. Can you please check the result if this is for example a sphere collider?

Yes it is a mesh collider on the Bird entity.

Yes it worked with sphere collider. But why is the mesh collider causing issue?

I think a mesh collider is too expensive for the physics world (on a mobile device), but I’m not sure.

But it does not work always with sphere collider too. Trigger gets activated sometimes only.

Do you move the Bird while testing? The collectables are currently not exactly on the same height as the bird and I expect the collider is moving up and down with the animation a bit.

Nope both of the entities are on the same height.

image

Hey but this could be a possibility as I have just double the size of the collectables along with their triggers and it is activating every time till now. I would test it for some time and then close the issue if it works fine. Thank you.

If the entity is moving on high speed, that can be the reason. You can check the topic below for more information about it.

https://forum.playcanvas.com/t/solved-fast-moving-rigid-bodies-can-pass-through-each-other/

1 Like