- Home /
Character controller collides to itself
I made a capsule with character controller that shoots spheres with character controllers in the cursor direction. Sphere is spawned just outside of capsule, little bit closer to cursor. When i shoot up, left and right everything works fine but when i shoot below capsule, sphere's character controller collides with itself many times, with CollisionFlags.None, or CollisionFlags.CollidedBelow. Why???
Set the sphere it is$$anonymous$$enematic, as it won't have physical properties, but can still be triggers. You will need to do some tricks to get it to turn that off when approaching another object if you want physics. You can try moving your spawn position and camera more closer to the outer radius of the capsule and when you shoot down it should avoid shooting yourself and colliding with the capsule. Or make a script to ignore your Player when the object is created.
Answer by Vox Nephila · Jun 07, 2013 at 05:13 AM
Just tag the player and set your code up to ignore that tag.
Transform.CompareTag("player");
One question though.. why are you setting the "spheres" up with character controllers? You should just use a sphere collider instead, since they're not controllers.
i made them sphere colliders and now they work fine :) Thanks
Your answer
Follow this Question
Related Questions
Staged bullet damage? 1 Answer
How can i change Angry Bots player shooting direction from x, z axis to x, y? 0 Answers
Help with a game! 1 Answer
How can I make a Grapple Gun work with the Character Controller? 1 Answer
super messed up speed 1 Answer