x


[Closed] Gun not to make it go through the objects

How can I make my gun not to go through walls.Also yes my gun already has a collider

  • Felipe
more ▼

asked Feb 25, 2012 at 03:55 AM

BigBlob gravatar image

BigBlob
400 169 126 134

(comments are locked)
10|3000 characters needed characters left

The question has been closed Jul 24 at 07:58 PM by duck for the following reason:

Duplicate Question: http://answers.unity3d.com/questions/39420/gun-goes-through-wall-in-a-fps.html


1 answer: sort voted first

What Ive done is make the gun small and then make the character controller a bit wider so it covers the gun.

more ▼

answered Feb 25, 2012 at 07:33 PM

Dreave gravatar image

Dreave
137 255 180 182

extending the collider is the worst thing you could do. Learn about layers. they are much more usefull

Jul 24 at 07:02 PM Domo23000

You mean the collision range wider, right?

Feb 25, 2012 at 08:05 PM BigBlob
(comments are locked)
10|3000 characters needed characters left

You need to setup a box collider around the gun but just behind the end of the barrel so that your projectiles can exit safely without being stoped by the Collider.

more ▼

answered Feb 25, 2012 at 05:48 AM

Durante gravatar image

Durante
36 70 49 52

(comments are locked)
10|3000 characters needed characters left

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1393
x648
x148

asked: Feb 25, 2012 at 03:55 AM

Seen: 1403 times

Last Updated: Jul 24 at 07:58 PM