I need help on explosions and collision trigger

honestly i want to make a bomb to explode when you drop it, but i have no clue how to do it, can someone help me on this, like give me the script or something

Hello @Kevin_Basulto_4699,

I suggest you start from this tutorial on how to use triggers and collisions
https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

And for the explosion effect here is another great example to use:
https://developer.playcanvas.com/en/tutorials/explosion-particle-effect/

can you please give me the script or do i have to do the tut

You will need to write the script yourself. Here is a good starting place for scripting with PlayCanvas:

https://developer.playcanvas.com/en/user-manual/scripting/

okay thanks!

1 Like

I need help on the collisions and trigger
im trying to do an explosion everytime it hits my ground,
but it keeps on saying error which is annoying and i need some help

please help me

Hi @Kevin_Basulto_4699! What kind of error do you get? Can you share a link of your project please?

https://playcanvas.com/project/902093/overview/idk

im trying to make it work but every time it would put an error

i forgot the error but every time an object touches the ground, all of them would go flying ,
the reason is because most of them are dynamic ridge bodies triggering, the root and that’s why so can you help me on the trigger?

That’s probably because you have some entities made as a child of anonther entity. That means that they all move togheter with the other entity, the parent.

image

thats the test place you need to go to the place

i figured it out but there was something wrong with the picker ray to pick things up
every time you pick up the trigger the entire picker raycast breaks down until you refresh the game, any help man?

When I launch your project I get two errors at the moment.

The first error is because you set an incorrect position in your trigger script.

image

The second error is probably because you add the collider script to an entity without a collision component.

i’d change it how about now?

is it okay if you do it for me?
im at class and i wanna get over with
its stressing me out

You changed the subject a few times during the conversation, so I’m not sure exactly what you want to do and which script or entity is involved. At least the errors are gone, so that’s good. :+1:

1 Like