Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Allowing Rigidbody to pass through some objects

Discussion in 'Getting Started' started by Zaine7673, Feb 28, 2018.

  1. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    Hi all,

    I'm wondering if there is a way to allow a rigidbody (the character) to pass through some objects but not others without coding it in somehow.

    I have an object imported from a blender file that i want to use as water. I want the character to be able to fall through it but he currently just sits on top of it which isn't what i want. And I've already made sure that there is nothing under it that he is sitting on.

    Any advice would be appreciated.

    Thanks,
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,842
    Yes, you can put the water in a different layer, and then adjust which layers collide with which others as described in the manual.

    EDIT: Or, simply remove the collider (probably a MeshCollider component) from objects that shouldn't collide with anything!
     
    Joe-Censored likes this.
  3. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    hey buddy, sorry for the late response.

    Had a look at it today again and it seems i had a collider on the parent object (duh)

    I'ts always the simple things lol

    thanks again. now for my next question on another thread :D
     
    JoeStrout likes this.
  4. Squiddharth

    Squiddharth

    Joined:
    Oct 2, 2020
    Posts:
    1
    bro u replied 7 years after holy crap
     
    ArjhanToteck likes this.
  5. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    HAHAHA na bro that's the year we joined the forum. this made me laugh though.

    Posted date is just under the comment ;-)