# How do I Get total/resultant velocity?

Get help using Construct 2

### » Sat Feb 25, 2017 10:41 am

The Physics behavior has these expressions: "VelocityX" and "VelocityY", and it has a condition for "Compare (total) velocity". However, I can't see a way to get the value for "total velocity" itself .

I've looked up the formula online but can't wrap my head around it. They seem to be teaching how to get Vx and Vy, given the total/resultant velocity and angle while in C2, it's the other way around, i.e. the Vx and Vy are known and the total/resultant velocity (while seemingly known since there's a condition for it) is not accessible to the user.

I need to know how to get total/resultant velocity given Vx and Vy. Thanks in advance!
B
13
S
3
Posts: 17
Reputation: 984

### » Sat Feb 25, 2017 11:33 pm

High school math class: the hypotenuse is equal to the square root of the sum of the squares of the two opposite sides. Speed being a direct derivative of distance, we can surmise that the same is true for speed also. Therefore:

Speed = sqrt( ( VelocityX^2 ) + ( VelocityY^2 ) )

[ Edit: in honesty I had to Google this, but did so by Googling 'converting two vectors to velocity' - which is as embarrassing for me as it should be for you ]
B
26
S
7
Posts: 254
Reputation: 2,389

### » Sun Feb 26, 2017 12:22 am

mrtumbles wrote:High school math class: the hypotenuse is equal to the square root of the sum of the squares of the two opposite sides. Speed being a direct derivative of distance, we can surmise that the same is true for speed also. Therefore:

Speed = sqrt( ( VelocityX^2 ) + ( VelocityY^2 ) )

[ Edit: in honesty I had to Google this, but did so by Googling 'converting two vectors to velocity' - which is as embarrassing for me as it should be for you ]

Yeah I am glad you added that edit as I knew there was a formula I learned in engineering but no way I could pull that out and drop it without looking it up first lol!
Banned User
B
29
S
7
G
58
Posts: 1,229
Reputation: 34,910

### » Sun Feb 26, 2017 5:52 am

You can also use the distance expression, after all it's the same equation.
distance(0,0,velocityX,velocityY)
B
97
S
36
G
131
Posts: 5,517
Reputation: 83,472

### » Mon Feb 27, 2017 6:42 am

Thanks! Yes, it's embarrasing The distance thing is very helpful as well!
B
13
S
3
Posts: 17
Reputation: 984