x


Fireball like effect

I'd like to create an effect where I can launch a fireball-like object from one location to another within my game world. My inital thought is to create a fireball GameObject with some particle effects attached and then use something like Vector3.Lerp() to animate that object between the two points.

My question is: Are there better ways to do this?

Perhaps using physics and colliders? Or the animation system? Or importing a custom animation?

If anyone with experience of doing similar can share what they did I'd be grateful.

Thanks!

more ▼

asked Nov 03 '10 at 02:44 PM

peacemaker gravatar image

peacemaker
275 6 8 17

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

1 answer: sort voted first

For the fire, particles are the best way to go.

If you are always throwing it the same distance, I've read somewhere that the animation system might be an unmeasuable amount faster. But I wouldn't trade that for the ability to be able to change it's movement via script. I would go with the physics system for this, add a force in the direction you are throwing it. This way you are sure to get a correct fall curve (if you game likes realism). Otherwise just Lerp/Slerp it.

more ▼

answered Nov 03 '10 at 02:50 PM

Atnas1010 gravatar image

Atnas1010
1.1k 6 10 26

The problem with using physics for something like a fireball is that it isn't a realistic object and does not have a realistic fly path. For it to behave like we often see you would need to add a substantial amount of force or lower the gravity. But if you want the grenade like flypath for it physics is clearly the way to go. I would go with a simple Lerp motion along its forward.

Nov 03 '10 at 02:58 PM Slem

Lerp does seem like the more obvious choice here, I think that is what I will do for now. Thanks guys.

Nov 03 '10 at 03:02 PM peacemaker

When I answered the question I was thinking like, medieval catapult fires a fireball. I now realize you might be dealing with magical fireballs :)

Nov 03 '10 at 03:10 PM Atnas1010
(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:

x3802
x1879
x264

asked: Nov 03 '10 at 02:44 PM

Seen: 1694 times

Last Updated: Nov 03 '10 at 02:44 PM