- Home /
Weapon In FPS Controller Not Colliding
I'm trying to make a game in which your character runs around and hits people with various objects he finds. The only problem is that the weapons don't collide with anything. I can't seem to add any colliders to the FPS controller, or any of it's childs. The only collider that works is the character controller. Is there any way I can get my weapons to have their own colliders? Here's how I have my controller set up right now:
Thanks in advance!
Answer by SpartanSperos · Jun 08, 2015 at 07:40 AM
I managed to solve my problem, and I'll explain how for anyone who is wondering. This post got 5 views in a day, so I assume someone out there will appreciate this.
First, I had to throw my FPS controller out the window, because it doesn't have a Rigidbody. Then I found a character model, and put it in an Empty. I then put a Main Camera in the same Empty. I attached a Rigidbody to my Empty. I found a character motor script, and also attached that to my Empty. Next I attached a capsule collider to my Empty. I renamed the Empty "That Guy In My Game" because, well, he is. Then I put a weapon, which is titled "Cube" in the diagram but we'll pretend it says "Weapon", in his hand, and gave it it's own Box Collider. If you can't understand anything I said, because my English is horrible, please refer to the diagram below. Good luck, and God Bless.
Your answer
Follow this Question
Related Questions
How come FPS charcter ignores any possible collider? 3 Answers
physics.OverlapSphere colliders 1 Answer
Performance issues with trigger colliders and lots of projectiles. 2 Answers
Why there is no Collider.IsTouching(...) ? 2 Answers
How do I prevent characters from being able to land on each others heads? 1 Answer