VRTK_Body Physics Help

Hello,

I can’t find a solution how to avoid some collision, i tried with layer “Ignore raycast” didn’t work in my case.
Then i tried with making tags, at least i tried to make a code to fix the problem, but it still doesnt work. I’m even not sure tags would work in that case.

private void StopCollision(GameObject inventory, bool state)
{
inventory = GameObject.FindWithTag(“Inventory”);
if (inventory)
{

IgnoreCollisions(inventory.GetComponentsInChildren(), true);
IgnoreCollisions(inventory.GetComponents(), true);

}

Basically i have a bullet spawning in the area of the body collider and that makes the character jumping everywhere. Also i’m using another code for grabbing some object and i’d like to avoid collision with both.

If anyone would help, i’d really appreciate.
My apologise if my english is not that good.
Thank you,

Using physics layers should work:

1 Like

Omg thank you so much!
Solved

1 Like

I think this is exactly what I was looking for. Your post is from Jan, so you helped me in the future. Time travel, awesome. Thanks.

1 Like