playMaker

Author Topic: Shooting fireball  (Read 3010 times)

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
Shooting fireball
« on: November 05, 2014, 02:25:05 PM »
Hi

I am trying to create a fire pit on my level where fireballs shoot out. Like mario in the cave levels

I have the pit spawn a fireball but trying to get the fireball to shoot up and then the gravity make it fall down.

Tried itween and move towards but does not really work

Would add force work?

robmyers67

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Shooting fireball
« Reply #1 on: November 05, 2014, 06:52:55 PM »
IS it a 2d or 3d game,
Either way force would be the right move.
If its 2D you need toadd force 2d and set it in the y. Make sure it has a rigid body either 2D or 3D.

Hope this helps

Rob

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
Re: Shooting fireball
« Reply #2 on: November 06, 2014, 04:38:16 AM »
Thanks Rob!

Im not at my dev computer so not able to test it out just yet.

Its for a 3D game, hopefully can get it working :)

Thanks again

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
Re: Shooting fireball
« Reply #3 on: November 07, 2014, 07:57:49 AM »
Hey

Cannot seem to get this working right - not used addforce so not sure if im doing something wrong.

I have 2 items;

1) Fire Pit - This has a child object "SpawnPoint" (this is where the fireballs spawn)

On the parent object I have the following FSM

Wait - which leads to pmt Spawn (which spawns the fireball at the Spawn point)

2) The Fireball

This object has a rigidbody Mass of 1, angular drag of 0.5 and gravity is selected, Kinematic is NOT selected

On the Game object I have the FSM;

State one: - Get Owner
State Two: Add force;

GO: Owner
At Position: none
Vector: none
X: 0
Y: 50
Z: 0
Space: Self
:ForceMode: Force
Every Frame: No

Any help on getting this sorted would be great!!

Thanks

lioncirth

  • Junior Playmaker
  • **
  • Posts: 74
Re: Shooting fireball
« Reply #4 on: November 07, 2014, 08:09:31 AM »
Solved it!

Sorry I was not applying enough force!! DOH!!!