- Home /
one animation kills the frame rate
hey, in my game i have a tree with a collider attached, each time an axe object collides with the tree, the tree animates another stage of falling over. when the tree finally falls over, it switches collider to one shaped like the fallen over tree. my problem is that my game usually runs at 600 fps, but drops to 10 fps when the animations are playing.
both the colliders are quite detailed but i didn't think it was possible for one animated object to have such a high frame rate cost.
thanks in advance
Answer by dannyskim · Oct 09, 2011 at 10:29 PM
Generating Mesh Colliders on the fly for static objects is fine, but when it's a moving object, that is when it takes a considerable toll on your CPU. You may want to consider turning off "Generate Colliders" for your animation, since you don't really need the geometry ( I'm assuming ) after your collision.
Answer by Dave M · Mar 09, 2011 at 11:03 PM
Maybe there are to many frames in the animation.Try to reduce the frames and manage the animation speed with a script.
what do you you mean by frames in the animation? each animation only lasted 10 frames in blender which is where i made them.
Answer by dannyskim · Oct 09, 2011 at 10:28 PM
Generating colliders for complicated geometry is fine for static objects, but when an animation is playing, the constant movement of the colliders is generated on the fly, which if you think about it can take a considerable toll on your CPU ( not GPU ). I'm assuming you don't need the colliders during your animation, so your best bet is to turn off the colliders during animation ( "Generate Colliders" in the FBX importer ), and then re activate them upon animation completion.
Your answer
Follow this Question
Related Questions
Why does simple animation slow frame rate down. 2 Answers
Can animations with different framerates be used on the same character? 1 Answer
Why is my application freezing every couple seconds? 0 Answers
Animation clips - what is normalizedSpeed actually doing? 2 Answers
Animation slows down game 2 Answers