Grenades not colliding

forzabo

Member
I've got a problem with grenades not actually colliding with anything in scene. They get thrown okay; I can confirm that the object being thrown is the grenade object, but the grenade just passes through all the colliders without anything happening. I've doubled-checked and experimented with the impact layers, those all seem to be set up correctly. I feel like I must be doing something stoopid but I'm baffled -- any clues or hints on what else to check?

TIA
 
This does sound like it is layer related. When you are setting the impact layers, are you setting it on the grenade or the throwable item? The throwable item overrides the grenade settings so you'll want to make sure they are correct on the throwable item.
 
So this gets to where I'm confused:

Where do I find settings for the throwable item? I created a grenade object per the docs, isn't that the "throwable item?" if not, how do I create a throwable item?

thanks
 
Update: I copied all the settings from the demo which led nowhere. Then I tested my character in a stripped down scene, and the grenade is working as expected (!)

Damn.

Now to figure out what the heck is special about my scene that is causing this!
 
Update #2: it is everything to do with the layer as you surmised -- when I change the layer of the scene items to Default, the grenade bounces as expected. But the weird thing is I have the grenade specified to also react to my custom layer (interior_unbaked) and that's what's not working. :/ weird.
 
After further experimentation and hair pulling, as far as I can tell the only layer the grenade will impact is Default, no matter what settings I twiddle. I must be missing something obvious.

Here are my settings. First, the grenade item attached to the character:

Screen Shot 2019-09-27 at 10.06.14 AM.png

next, the throwable grenade prefab:

Screen Shot 2019-09-27 at 10.06.40 AM.png

If I set the collider's layer to interior_unbaked, the grenade passes right through it. Only when I set the floor collider to the Default layer does the grenade bounce instead of passing through.

Screen Shot 2019-09-27 at 10.07.15 AM.png

I've tried many combinations of settings, it all leads back here. Is there some other setting I'm missing?
 
Those settings look correct. The best way to debug this is if you place a breakpoint within TrajectoryObject.Update and check the Capsule or Sphere cast. When the grenade is colliding with the floor does it return the floor? I'm betting that it won't but if it does then something else is going on.
 
Those settings look correct. The best way to debug this is if you place a breakpoint within TrajectoryObject.Update and check the Capsule or Sphere cast. When the grenade is colliding with the floor does it return the floor? I'm betting that it won't but if it does then something else is going on.
Um, where is TrajectoryObject.Update because I only see FixedUpdate or are you saying add void update and place breakpoint there?
 
Top