Speed up the animations ingame

There are no stupid questions, just stupid answers.
  • 1
  • 2
12 posts Page 1 of 2
the1skorpion
Posts: 4
Joined: Sun Oct 04, 2015 12:40 am
by the1skorpion » Sat Feb 04, 2017 3:00 am
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
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Feb 04, 2017 1:13 pm
Open in shape editor you can adjust the speed there I think.
the1skorpion
Posts: 4
Joined: Sun Oct 04, 2015 12:40 am
by the1skorpion » Sat Feb 04, 2017 1:36 pm
@
User avatar
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
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Feb 04, 2017 3:18 pm
Well it is not that simple, for example move animations have a ground scale, for example here https://github.com/GarageGames/Torque3D ... ged.cs#L65
The 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 ... er.cs#L778
And here if it should be scaled to fit the time the reload state goes:
https://github.com/GarageGames/Torque3D ... er.cs#L782

So 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?
Caleb
Posts: 14
Joined: Tue Feb 10, 2015 5:01 pm
by Caleb » Sat Feb 04, 2017 5:20 pm
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.
the1skorpion
Posts: 4
Joined: Sun Oct 04, 2015 12:40 am
by the1skorpion » Sat Feb 11, 2017 1:56 pm
Thank you so much for your quick answers @
User avatar
Duion
and @
User avatar
Caleb
. I shall see what I can do with the info:D
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Sun Feb 12, 2017 3:59 pm
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 datablock
in 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
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun Feb 12, 2017 10:06 pm
@
User avatar
J0linar

That does not affect the animation speed.
J0linar
Posts: 45
Joined: Thu Feb 05, 2015 8:50 pm
by J0linar » Mon Feb 13, 2017 12:10 am
how about letting ppl try! stateTimeoutValue affects how slow or fast the animation gets played in the first person
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Feb 13, 2017 11:08 am
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.
  • 1
  • 2
12 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 2 guests