the1skorpion Posted February 4, 2017 Posted February 4, 2017 Hello Torque community! I´m very new to Torque so I was just wondering how one can speed up the animations. For example let´s say that I have a running animation that´s 30 frames long. Torque is going to play it in 24fps if I´m not mistaking, but that looks incredibly slow ingame. So yeah how can I go about to speed the animation up. Thank you so much in advance Cheers,-Patrick Quote
Duion Posted February 4, 2017 Posted February 4, 2017 Open in shape editor you can adjust the speed there I think. Quote
the1skorpion Posted February 4, 2017 Author Posted February 4, 2017 @Duion The only thing that I found in the shape editor was the playback speed, but when I tried to play the game the animation speed was still at default speed https://www.dropbox.com/s/ncy9ds2o4ay0tu5/Playback%20speed.png?dl=0 Quote
Duion Posted February 4, 2017 Posted February 4, 2017 Well it is not that simple, for example move animations have a ground scale, for example here https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/art/shapes/actors/Soldier/soldier_rigged.cs#L65The numbers there determine how fast the animation playes relative to movement of the player.Other animations like look animations depend on how fast you move your mouse and weapon animation depend on how fast you scale the state in the state machine or if you scale it at all or not.This is how long the reload animation for example plays:https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/art/datablocks/weapons/Lurker.cs#L778And here if it should be scaled to fit the time the reload state goes:https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/art/datablocks/weapons/Lurker.cs#L782So you have movement animations which are based on ground speed and you have state machine animations for weapons and player interaction that are based on the speed of the states in it and if you activate the flag if the animation should scale.Anything else you want to scale? Quote
Caleb Posted February 4, 2017 Posted February 4, 2017 If you're willing to dive into the engine code a bit, then you can easily add a custom timescale for player animations in player.cpp. In the parts that update animations sequences, find the areas that multiply by "dt" and also multiply by your custom timescale. This can affect a few other behaviors such as player scheduled actions as well, but may be what you're after. I'm sorry I can't be more specific on the changes as I don't have the code in front of me at the moment. Quote
the1skorpion Posted February 11, 2017 Author Posted February 11, 2017 Thank you so much for your quick answers @Duion and @Caleb. I shall see what I can do with the info:D Quote
J0linar Posted February 12, 2017 Posted February 12, 2017 open up the datablocks of weapons for example the one of the lurker and search for ´ stateTimeoutValue = 10;// change the number to affect the animation speed in the first person.for thirdperson you can always edit the player datablockin player.cs see for example crouchForce = 405; maxCrouchForwardSpeed = 4.0; maxCrouchBackwardSpeed = 2.0; maxCrouchSideSpeed = 2.0;just play around with the settings till ur satisfied Quote
Duion Posted February 12, 2017 Posted February 12, 2017 @J0linarThat does not affect the animation speed. Quote
J0linar Posted February 12, 2017 Posted February 12, 2017 how about letting ppl try! stateTimeoutValue affects how slow or fast the animation gets played in the first person Quote
Duion Posted February 13, 2017 Posted February 13, 2017 For the state machine yes, but you would have to set stateWaitForTimeout, stateScaleAnimation and maybe also stateScaleAnimationFP all to true before it works and the state needs to have an animation, ah and maybe that stateScaleShapeSequence as well to true and this only works for weapon images.But I was mainly referring to your run speed settings, which just change the run speed, not the animation relative to it, you have to change the ground transform scale factor in the script files directly for the animation to change speed as I said. Quote
oXYnary Posted March 7, 2017 Posted March 7, 2017 Hello Torque community! I´m very new to Torque so I was just wondering how one can speed up the animations. For example let´s say that I have a running animation that´s 30 frames long. Torque is going to play it in 24fps if I´m not mistaking, but that looks incredibly slow ingame. So yeah how can I go about to speed the animation up. Thank you so much in advance Cheers,-Patrick I'm not quite sure that's correct. I always export at 30fps (want to do 60 for final if possible for smooth animation). My time synchs in game with same frame count... at least I think it is?!Duion, has anyone figured a conversion method to change the player class speed entries into real world measurements? Its input matches nothing, so its trial and error to match (at default scale). Quote
Duion Posted March 7, 2017 Posted March 7, 2017 Everything already done:https://github.com/Duion/Uebergame/blob/master/scripts/server/player.cs#L745-L758of course it matches real world scales, Torque is metric. #torquemasterrace Quote
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.