- Home /
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!
Answer by Atnas1010 · Nov 03, 2010 at 02:50 PM
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.
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.
Lerp does seem like the more obvious choice here, I think that is what I will do for now. Thanks guys.
When I answered the question I was thinking like, medieval catapult fires a fireball. I now realize you might be dealing with magical fireballs :)
Your answer
Follow this Question
Related Questions
How do I animate complex objects? 0 Answers
How To Implement An Active Ragdoll? 0 Answers
Can I make animations snap to a frame? 1 Answer
Raycasting colliders moved by Mechanim animation? 0 Answers
Material transition through animation 3 Answers