x


3rd Person Throwing Grenade Question

Hi all! I'm currently developing on a game called Three Worlds, a 3rd Person game. Everything is all set up, the levels, player etc. Now i want to get started on weapons. I've decided to start off with the grenades. I managed to create a 'throwing grenade' animation for the character and now here's the tough bit.

Just as i click the button to throw the grenade (Left Mouse Button), the grenade appears when the character animation looks like as if he is throwing the grenade and the grenade is then thrown somewhere, like force is applied to it with the rigibody attached, and after about 3 seconds, the grenade explodes.

I've managed to create the models, the explosion particle effects but i want to know the coding for this to work. I'm not much of an experienced scripter so i'm not exactly sure what to do.

more ▼

asked Dec 11, 2010 at 12:59 PM

TheTechZone gravatar image

TheTechZone
13 15 12 13

Have you made the animation using bones if so you can easily parent the grenade to your hand bone to make it follow the movement of the arm. so you instantiate at transform.position of the bone. then you could try checking the speed and detach it with this force not sure if it would work though. just an idea

Dec 11, 2010 at 01:09 PM Scribe

Also you can give it a layer like grenade, and go into the physics options and turn off physics between the player and the grenade to ensure that your model doesn't interfere with it.

May 10, 2011 at 10:01 PM Rabwin
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x229
x148
x59
x38

asked: Dec 11, 2010 at 12:59 PM

Seen: 1844 times

Last Updated: Dec 11, 2010 at 12:59 PM