Loading...

Weapon cycle in Unity 3d

10,190 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jul 22, 2013

http://xenosmashgames.com/weapon-cycl...
In this Xenosmash tutorial we'll go over how to switch between two different weapons using an array. We'll start off by positioning our weapons against our first person controller. Both weapons should ideally be in the same spot for congruency.
Make sure that you have an empty game object that is a child of the camera of our first person controller. This is where the script will be applied and also where the weapons will be "nested" under as child objects.
Make sure both weapons are visible and apply the script to your empty game object. Adjust the array length to fit the size of your weapons available. So if you have two weapons, set the size to 2. You should now be able to cycle, or switch, between your weapons. When one is active, the others are not active and not visible.
The script can be copied from here: http://xenosmash.com/weapon-cycle-in-...

  • Category

  • License

    • Standard YouTube License

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...