Jump to content
Sign in to follow this  
zapat

Velocity vector and movement speed?

Recommended Posts

I am doing some tests with velocity and speed. I am not that good in physics and maths, so I'd be grateful for clarifications.

So. When my unit is running, he has 4.87 m/s speed. I calculate it from the X and Y compontent of the velocity vector.

sqrt (((velocity player) select 0) ^ 2 + ((velocity player) select 1) ^ 2);

This is movement on horizontal terrain. Now so far so good. I must add, that this is slower than A2's movement speed. So while many is complaining about A3 movement being faster than A2 it is really slower.

But! My question kicks in, when there is a slope in the terrain, and the Z component of the vector is starting to rise.

-> with the same movement speed (compared to the terrain) shouldn't the 2D (XY) projection of the 3D vector lessen while the Z rises, so that the length of the vector (the movement speed) would stay the same?

Share this post


Link to post
Share on other sites

You're right. The length of projection of x- and y-axises should decrease when the absolute value of z increases to compromise the change in z-axis, that is a requirement to keep the actual movement speed in 3D world as same regardless if the ground is flat or not. However, this is not taken into account by the engine. You can notice the effect when you run up a very steep hill: your character moves up the hill very quickly because only the x- and y-axises are taken into account when simulating the speed of movement.

In addition, the movement speed in 3D world could be dependent on the speed of change of z-axis, because the maximum speed of e.g. human naturally decreases roughly the more, the bigger the speed of increase in z-axis is and increases roughly the more, the bigger the speed of decrease of z-axis is because of the gravity.

Edited by Ezcoo

Share this post


Link to post
Share on other sites

"You can notice the effect when you run up a very steep hill: your character moves up the hill very quickly"

Thanks. This is exactly why I was asking this. It feels like the avatar is not climbing as fast to hills as he runs on the airfield, but even faster...

Can it be reported as a bug?

It was the same in A2 too, but in A3 it may cause the outcry about the arcadish movement, because it is really apparent for some reason... And it is not hard at all to correct.

Share this post


Link to post
Share on other sites

-> with the same movement speed (compared to the terrain) shouldn't the 2D (XY) projection of the 3D vector lessen while the Z rises, so that the length of the vector (the movement speed) would stay the same?

moving down:

no because the energy for the additional speed comes from gravity.

he has still the same amount of energy for his x-y...

(in reality okay yes, because it is difficult to run fast on terrain you are more careful etc)

--

but when moving up the hill -yes! because he needs the energy for the z component now!

--

Edited by tremanarch

Share this post


Link to post
Share on other sites

Okay, it is about mixing physics and maths right?

So if it were basic maths, then Ezcoo would be right. That is to keep the length of the vector, you need to decrease XY dimension while increasing the Z dimension.

But there is physics involved with gravity: when going down, gravity stretches the vector's length (I was using this on my freefall bomb script I remember now), so the XY dimension would stay the same.

When going up, gravity is against the Z dimension, so it should make the vector smaller than its original size. Would this affect the XY dimension as well? Or only the speed compared to the terrain (becasue of a decreasing Z) would fall?

Do I understand it right?

It wouldn't be that hard to write an FSM which calculates and adjusts the proper velocity for the player on hills. It just doesn't worth the performance, or why is BIS neglecting this?

(At least in A2 the avatar changed to walking on a steep hill.)

Share this post


Link to post
Share on other sites

the best would be to record oneself how quick you run up, down and straight.

i guess up and down will be slower and more exhausting while up while be much more exhausting and also slower.

this will give the most realistic result... (there are too many variables)

then divide by the games default run speed and calc the up down ;)

Share this post


Link to post
Share on other sites
the best would be to record oneself how quick you run up, down and straight.

i guess up and down will be slower and more exhausting while up while be much more exhausting and also slower.

this will give the most realistic result... (there are too many variables)

then divide by the games default run speed and calc the up down ;)

Also the weight of the stuff that the character is carrying should really be taken into account to achieve realistic results. It would be pretty hilarious if a character with basic combat equipment, NLAW and 3 rockets ran up the hill happily :p

Edited by Ezcoo
typo

Share this post


Link to post
Share on other sites

Doesn't the player automatically go into a slower animation when he meets an incline? In my game it has been this way since opf. This automatically slows the player to a near snail's pace without any formula alterations.

Share this post


Link to post
Share on other sites

Not in A3.

Here we are running up and down hills. Sprinting is disabled though on slopes.

Maybe running will limited too later on, I was just wondering if it could be made more realistic.

Share this post


Link to post
Share on other sites

If you are right about the speed that is very fast even over flat terrain carrying a full battle pack. It's ok for a very short sprint burst maybe but is too fast for a sustained run. Elite athletes carrying nothing manage 20kph over 10k run, 22kph over 5k run. Good club runners (still faster than most soldiers) may manage 16kph over distance carrying nothing. So to have us run over terrain at 16kph with full pack seems rather spectacular to me.

Share this post


Link to post
Share on other sites

Yes I am absolutely sure about the speeds. In A2 these were slightly more!

run: 17 km/h speed = 4.87 m/s 2Dvelocity (4.96 in A2)

sprint: 24 km/h speed = 6.66 m/s 2D velocity (6.43 in A2)

tactical: 5km/h speed= 1.57 ms 2Dvelocity (1.86 in A2)

siderun: 3.35 m/s (3.09 in A2)

backpedal: 2.94 m/s (3.6 in A2)

crouch: 0.84 m/s (0.9 in A2)

I can accept this as a golden middle between realistic and enjoyable speeds. Your sense of speed is a lot more limited in front of a 2d monitor. You should have 180° fov, (which would distort the world on a 2d monitor) to feel the same speed as IRL. So yes these are fast compared to RealLife, but acceptable in a game.

What I don't like is the slight acceleration when you are running up a hill. I still don't know if it is mathematical (2D vs. 3D velocity), or I just got used to being slowed down by a slope in Rela Life. :)

Edited by zapat

Share this post


Link to post
Share on other sites

The running fast up hills right now is because the hack from Armed Assault + Arma 2 that artificially slowed you down isn´t in, so we´re back in OFP times where you could warp up hills at mach 10 (until they added the thing where you fell to a crawl in an early patch).

As far as the game is concerned, Units in contact with the ground do not have a Z velocity. This is especially grating on the very steep hillsides next to the cliffs that line the northeastern side of Stratis.

Physx doesn´t seem to be concerned with Infantry units as long as they are alive. The fatigue system possibly takes the slopes into account, but I don´t think that´s happening either right now. Overall, I´d love to see some sort of fix for this. Ascending a hill is -tremendously- tiring, and the kind of speeds Units develop right now put real life speedclimbers in underpants to shame. :I

Share this post


Link to post
Share on other sites
The running fast up hills right now is because the hack from Armed Assault + Arma 2 that artificially slowed you down isn´t in, so we´re back in OFP times where you could warp up hills at mach 10 (until they added the thing where you fell to a crawl in an early patch).

As far as the game is concerned, Units in contact with the ground do not have a Z velocity. This is especially grating on the very steep hillsides next to the cliffs that line the northeastern side of Stratis.

Physx doesn´t seem to be concerned with Infantry units as long as they are alive. The fatigue system possibly takes the slopes into account, but I don´t think that´s happening either right now. Overall, I´d love to see some sort of fix for this. Ascending a hill is -tremendously- tiring, and the kind of speeds Units develop right now put real life speedclimbers in underpants to shame. :I

Fatigue is working fine, I hike everywhere and hardly ever use transport. If anything the fatigue can in fact be quite annoying for someone like myself who walks everywhere, combat pace low stance is a godsend as far as I am concerned. ;)

Share this post


Link to post
Share on other sites

I find the sprint way too fast on opponents but too slow on my character. Id rather have realistic speeds though, that's why transport, even if its stealing a car, is so essential.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×