x


Creating a Mounted turret

hey guys i've been trying to figure this out. how can i make a weapon that is mounted (in other words stuck where it is) useable(FPS Game). i have the ability to pick up weapons, but i dont want to "pick it up permanently" but create and get on and off type weapon, similar to the MG in call of duty series and games like that.

thanks in advance

more ▼

asked Sep 18 '10 at 02:06 AM

name111 gravatar image

name111
161 5 6 15

You should try to keep one topic to one tightly related question. If, the physics and audio are "unrelated", then don't put them in this question. Either make a new one or search for it.

Sep 18 '10 at 03:18 AM Peter G
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Have a trigger zone around the turret and in OnTriggerEnter() check if user has pushed your Use button. If they have, make the player invisible (GameObject.visible?) by using player.gameObject.active = false and then switching the current Camera off and the Turret's Camera on. Then you need to write a script to control the turret

Edit: To make a trigger zone, go to GameObject -> Create Other -> Cube, resize the cube until it is the right size for your trigger zone, then on the box collider check Is Trigger and remove the Mesh Renderer. Then tag your player as Player and then you can check if your player walks into the trigger zone like this:

function OnTriggerEnter(collision : Collider) {
    if (collision.gameObject.CompareTag("Player") {
       // Player has walked into trigger zone.
    }
}
more ▼

answered Nov 30 '10 at 05:43 AM

fireDude67 gravatar image

fireDude67
945 9 15 30

how would i make a trigger zone?

Dec 06 '10 at 08:47 PM name111

edited post to show how to make trigger zone

Dec 28 '10 at 07:44 PM fireDude67
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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:

x2992
x446
x217
x172
x2

asked: Sep 18 '10 at 02:06 AM

Seen: 1288 times

Last Updated: Sep 18 '10 at 03:15 AM