playMaker

Author Topic: Adding Explosive force [SOLVED]  (Read 3508 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Adding Explosive force [SOLVED]
« on: October 22, 2011, 05:29:58 PM »
so, i've got a FSM made such that when a monster is killed, it spawns random gibbets randomly within an area with it's center being where the monster is (or, more appropriately, was.)

thing is, it would be nice to give it some explosive force but i don't think i'm using the "add explosive force" correctly. (sadly, i've tried uploading a screenshot of how it's configured but my connection is too spotty for that.)

the gibbets have the rigidbody physics component added so that they fall and though they are kinda exploding, it's not because of the action (it's because some of them overlap and the rigidbody engine i think tries to make them come apart) reason i'd like to add the proper force is two fold... first to know how to use it properly, second is so that i can make the gibbets smaller if need be.

i've even tried ramping up the force to astronomical levels ("99999" in both force and radius) to test, and it doesn't do it. is there a tutorial on how to do it correctly so that i can learn me some physics stuffs?

to help give some clarity on the situation, i've got it so that it cycles through the "add gibbet" section randomly so i can have some randomness to the number and size of the gibbets.

so, i think in order of execution.

1. create a random number from 3-8
2. create three random float variables (from -1 to 1) and put those into the X, Y and Z values of a vector3 variable.
3. select a random object (using the action and each gibbet listed in that action) and put selected object into a gameObject variable.
4. spawn object at the point of the monster, offset by the previous vector3 variable value
5. add the force (still have yet to get it to do what i need it to.) (step 5 and 6 are in the same state, one after the other.)
6. test if the value of the number from step 1 is at or below 0, if so, end the cycle... if not, go back to 2.

anyone able to help with this one?
« Last Edit: November 05, 2011, 02:52:55 PM by alexchouls »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Adding Explosive force
« Reply #1 on: October 23, 2011, 03:51:03 PM »
i think i may have resolved this. i'll do some testing and confirm.

yep, i got it... a pebcak error.
« Last Edit: October 23, 2011, 03:57:16 PM by Red »