Rick Posted December 12, 2009 Share Posted December 12, 2009 I'm trying to figure out the best way to make it so multiple instances of an animated model that all start out with the "idle" animation don't all play in sync. I need a way to make them start on a random frame inside the range of the idle animation. They only need to do this at startup. When the game is running and I set it to "idle" they should start at the beginning. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 12, 2009 Share Posted December 12, 2009 The animation state between instances are not related, so I don't see any problems here. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted December 12, 2009 Author Share Posted December 12, 2009 Right, but if I default the starting animation for an object to be "idle", then place 5 objects in my scene, they will all start out the same and do the exact same movements. I want them to be idle, but if they start out at different idle frames it makes it looks less like they are synchronized swimmers. Just wonder a good way to do this is all. Quote Link to comment Share on other sites More sharing options...
Niosop Posted December 12, 2009 Share Posted December 12, 2009 Just set the frame no to some random frame (math.random(start_frame, end_frame) or similar should help), then in your Update instead of animating based on apptime, animate based on apptime-lastframetime. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
TylerH Posted December 13, 2009 Share Posted December 13, 2009 niosop tells you the truth. This is how I handle weapons going from idle animation to moving animation and back. Basically, everytime the animation state changes I reset the weapon.LastAppTime value, so that the animations play from where I want them, when I want them to. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.