- Home /
noob colision help!
I am making a 2d shooter with a top view and... my character is a sphere. i want the sphere to collide with a wall (cube). I tried out rigid body but it just makes the wall slide or tumble.
Are you using Unity's primitives or Sphere/Cube meshes you brought in custom?
I'm using whatever is here: GameObject > Create Other > Cube.
Answer by Edy · Jul 23, 2010 at 07:28 PM
Remove the rigidbody component from the wall, leaving only the collider and the renderers (mesh renderer and mesh filter).
EDIT: If you are using mesh colliders instead of the default sphere-cube colliders, you must enable the property convex in both.
i tried that but the sphere goes right through the wall
Ensure that the sphere has its sphere collider, the box keeps its cube collider, and none of the colliders are marked as "Is Trigger".
Also, how are you moving the sphere?
Also, if you are using mesh colliders ins$$anonymous$$d of the default sphere-cube colliders, you should mark both of them as "Convex".
Answer by Willem · Aug 17, 2010 at 06:54 PM
You can either add a Box Collider, or increase the mass of the rigid body so that its much heavier than the sphere.
Answer by Wotan · Sep 15, 2010 at 07:29 AM
Add a character controller to your character and move it with the move methods of the character controller. As stated before make sure that you have colliders on your character and the wall.
Your answer
![](https://koobas.hobune.stream/wayback/20220613065514im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
OnTriggerEnter2D working sporadically 2 Answers
Why Does Object Keep Getting Faster? 1 Answer
How do I get the player and the object they touch both disappear/destroyed? 1 Answer
How to make multiple objects mirror Player movement AND share collisions 1 Answer
BoxCollider2Ds overlap each other 0 Answers