Given the amount of spam I’m guessing you’re getting a hit per each time the rubble bounces.
Not sure how you have this setup, and I haven’t used destructible meshes at all, but here’s what I would look into …
If you only want to register hits on player then set collision type to only collide with the players type. You still chance multiple hits on the player though so you will probably want a custom function on the player to check how recently it’s been damaged by terrain before dealing more.
Hi Distul, and thanks for taking your time to answer my question.
About the amount of hits, i made a lot of tests of this, and it seems that i have 25 pieces of rubble, but i get well over 150 hit events, and judging from the amount of hit lines (visible on the video), something else must be up too…
Regarding my goal of this. Actually i want to register when each chunk hits the ground (and the player), for two reasons:
to render some dust/play a sound of stones falling
to register damage to player if velocity/weight is over a certain amount
My question could also be: How do i only register physics chunk hits over a certain amount of force?
You’re definitely getting a hit per bounce, per debris. As mentioned I’m not very familiar with destructable meshes so you may have to make an array of the meshes when they separate (if that’s possible) and check if each item in the array has already been processed for hits.
Not 100% sure on how to go about this without having a setup myself, sorry.
I have tested this several times now and also tried just printing out a message when i hit another mesh. It will keep firing over and over as long as im in contact with it, which is the case with the falling rubble. It wont just bounce off with one hit. So how have other people solved this?