How do I Get total/resultant velocity?

0 favourites
  • 5 posts
From the Asset Store
Cue in the war drums and battle cadences with Total War Game Music Loops!
  • 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!

  • 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 ]

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can also use the distance expression, after all it's the same equation.

    distance(0,0,velocityX,velocityY)

  • Thanks! Yes, it's embarrasing The distance thing is very helpful as well!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)