|
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!
(comments are locked)
|
|
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.
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)
|
