How do i make a wall only solid to the player gameobject
I'm working on a 3D game an I need a way to make a wall that is solid to the player but non-solid to everything else, I've looked on the forums and the wiki but I can't find any solutions. any help is greatly appreciated.
Layer-based collision is what you are looking for. Layer-based collision
Answer by Happy-Zomby · Oct 01, 2016 at 07:21 AM
Hi, how are you moving your items - if you are using the navigation mesh - you can use areas masks.
https://docs.unity3d.com/Manual/nav-AreasAndCosts.html
Only the non player items would have the walls in their area masks.
If you are using physics - you could change the rigid body to your non player items to kinematic when they enter the trigger area of your wall and change it back after.... you may need to deactivate gravity also
https://docs.unity3d.com/ScriptReference/Rigidbody-isKinematic.html
hope one of these helps,