x


Make grenade apply force to rigidbodies around it

Okay, so I have a grenade script that works fine, but I would like to make it apply force to rigidbodies around it when it explodes. For example, if I throw it at a bunch of crates, I want it to make them fly away when it explodes. How can I do this? Thanks

more ▼

asked May 24 '11 at 09:15 PM

Syllith gravatar image

Syllith
44 9 10 13

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

2 answers: sort voted first

Here's the documentation page on it. It would be fairly straight forward to adjust this to your needs. I made a script somewhere for exponential fall off, I think it was on the forums. If I can find it I'll link to it as well.

Found it. I think the math on this page is correct for an exponential fall off.

The final force = defaultForce * falloff ^ -distFromBlast

more ▼

answered May 25 '11 at 01:28 AM

Peter G gravatar image

Peter G
15k 16 44 136

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

answered May 24 '11 at 09:31 PM

flaviusxvii gravatar image

flaviusxvii
3k 13 19 43

Actually im not. Ive been looking it up, but havent been able to find it.

May 25 '11 at 12:25 AM Syllith
(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:

x1787
x292
x161
x23

asked: May 24 '11 at 09:15 PM

Seen: 1241 times

Last Updated: May 25 '11 at 01:36 AM