Hello everybody,
I’m Tib, a hobbyist game developper trying to make my 3d shmup
I hope this question has not been answered yet… I’m struggling with this problem since some days…
I want my enemies to come from predefined 3D paths and I’m looking for the best way to do it.
They may come back and forth from places that are not in the action 2d plane. Like in this video (at the 9-10 th second for example):
So my path object would be made of transforms, so that the enemy position would follow smoothly (catmull rom or hermite) path nodes positions and enemy rotations would follow smoothly nodes orientations (squad maybe).
Here are the solutions that I see:
-
using a tweening system
I tried Hotween for example, which is very nice but I think it can only interpolate positions. For orientations interpolation, I think I should write my own plugin or use callbacks. Looks complicated… -
using unify spline interpolator (http://wiki.unity3d.com/index.php?title=Hermite_Spline_Controller)
I looked at the code, and it does quaternion interpolation by using squad which I think is what I need.
But I’m afraid that if I have too many enemies (maybe 50) following the path it would be too heavy for the cpu (not sure about it).
That’s why, I’m think of this third idea:
- making the path animation in blender and baking it. It looks feasible but the problem, is that I don’t know how to do it
I would be very interested in having your expert advice about these ideas and other ideas!
PS: sorry for my bad english, I’m french
Thank you!
Tib