[SOLVED] Adding collision dynamically

I have created a flower run game… which is forked from ‘food run game’ from the tutorial… I have added two other templates other than apple , banana and cake … But the newly added template is not detecting collision… i have consoled the “collectabletemplate” array… First three items have collison and script component … but the newly added template don’t have collision and script

https://playcanvas.com/project/975607/overview/dfdrgrdgdr

Hi @Kiran_Raj_N_V,

Your flower Green template is missing a collision component, and the collectableController script the other templates have.

Check them out and follow their component structure to get it working:

1 Like

thank you it worked

2 Likes