Jump to content

multiple instances and animation


Rick
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

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.

52t__nvidia.png nVidia 530M cpu.gif Intel Core i7 - 2.3Ghz 114229_30245_16_hardware_memory_ram_icon.png 8GB DDR3 RAM Windows7_Start.gif Windows 7 Ultimate (64x)

-----

IconVisualStudio16.png Visual Studio 2010 Ultimate google-Chrome.png Google Chrome PhotoshopLinkIndicator.png Creative Suite 5 icon28.gif FL Studio 10 MicrosoftOfficeLive.png Office 15

-----

csharp.png Expert cpp.png Professional lua_icon.png Expert BMX Programmer

-----

i-windows-live-messenger-2009.pngskype-icon16.pngaim_online.pnggmail.pngicon_48x48_prism-facebook.pngtunein-web.pngyahoo.giftwitter16.png

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...