I’m trying to understand how the frame rate of imported FBX files work in conjunction with the speed at which Unity plays them. And also how this links up with their displacement when used with the character controller script. I assume some of this will be script dependent and have been primarily looking at the animation controller used in the 3D platformer tutorial.
If anyone can offer an explanation or direct me to one that would be much appreciated. Cheers
I think it is all tied down to your framerate at which you make your animation and the number of frame you have
so if you have a 24fps recorded animation and 72 frame in your animation at speed = 1 , your animation will have a duration of 3 seconds
then the amount of distance do your charcater do not rely really directly to me to the animation speed itslef, but for a proper motion you will have to set that up accordingly with your animation speed , which in my case ( i know it may be a shame :roll: ) I simply eyeball it tweaking a “speed” variable for my move with a character…
If the FBX format does take note of the animation packages frame rate, and this equates to a play speed of 1 in Unity, that clears some stuff up already.
But we should be able to do better than getting the movement distance and speed to match up by trial and error. If your character moves 10 units in your animation package for its 24 frame walk cycle (the actual displacement is obviously removed before export so he’s walking on the spot)and the frame rate is 24fps. Then in Unity he needs to be covering a distance of 10units/second at a play speed of 1.
In the 3D Platformer tutorial it’s a little hard to work out whats going on as the speed you assign to the character is a single unitless number. I’ll delve a little deeper.
Well depends on unit size then , if you consider that unity may use 1 unit = 1 meter , then your will have a superman covering 10meter per second when walking…
also well , unit in your 3D package wont eventually match the one in unity.
most of the time your walk , or run etc…are “in place” animation, with no infos related to distance really.
What you could do instead if you really want to have a matching amount to move comparing to your fps / frame in your animation is maybe find the relation between the 2 that work for you and set the moveAmount value from that.