- Home /
invisible walls
Hey,
I have a player, which gets the position from the position of a real robotic arm and moves according to it. So I move the robotic arm->player in Unity moves. Now I made a level with the help of Industrial asset pack of Arkham Interactive. If I understand correctly each objects has different LODs but each LOD has a box collider.
My player has a box collider as well, but no rigidbody. How do I make these objects or another objects, like an invisible wall, unpassable?
Answer by Eudaimonium · Aug 27, 2015 at 09:50 PM
Without a rigidbody, you can only hack up a script or two that will stop the player once it hits some other collision boxes, but using a RigidBody will enable proper physics interaction. Walls should have box colliders, and players should have box colliders and rigidbody components. That makes walls immovable and player interactable.
Why are you not using a rigidbody component on a player object?
Sidenote, make sure that your invisible walls' boxes are not marked "Is Trigger". That only activates collision events but doesn't actually participate in collision response calculations.
I didnt use a Rigidbody at first because I do not want the player to be moved by the physics engine of Unity, because the position of the player is mapped to the position of the robot anyway. But now I added the rigidbody but with a high mass and a high drag. Now it does not bounce of the ground or other objects.
But if you want it to be blocked by walls, it must be moved by the physics engine.
So you managed to solve this using mass and drag settings now?
Answer by ash_richie · Mar 16, 2016 at 05:03 PM
Use a cube as your wall
and in the inspector UNCHECK the MESH RENDER
AND ALSO IN LAYER CHOOSE TransparentFX
m.png (10.0 kB)
l.png (10.7 kB)
Your answer
![](https://koobas.hobune.stream/wayback/20220612001521im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NavMesh Collision Detection? 0 Answers
Ball falls through the floor... why? 1 Answer
Drag & Drop GameObject with MovePosition shoots other Gameobject away in case of them colliding 1 Answer
Rigidbody not working 0 Answers
How to move a tank? 1 Answer