@Rhindon, maths, trigonometry and engineering physics are my forte - but not when I'm tired LOL - which is why I love C2 because I'm also, it seems, unable to learn how to code effectively (and I've tried - I just don't have the patience / aptitude!).

Rhindon wrote:Why the square root? What is the meaning of the maths here?

LOL

All I was doing was applying Pythagoras' Theorem to the data from the physics behavior. It's a fancy way of saying that I took the velocityX and velocityY values from the physics behavior and added them together to determine the overall velocity of the object. They can't just be added together, though, they need to be squared before they are added - by taking the square root of that sum it allowed me to work with a pixels per second value, which is easier on my brain, although not strictly necessary. This

explanation does a better job than I can to explain how it works, if you're interested!

Rhindon wrote:Also, what is an "arccosine". Even in my brief time in Trig/Calc in high school, I do not recall ever learning about this.

The arccosine of an angle is simply the inverse of the cosine of an angle. LOL - I must have been tired when I put that example together - luckily I stopped trying to calculate whatever it is I was thinking of by using that equation. It simply won't work - if the velocityY is zero it will return NaN.... Oh well... I'll go and edit it out of the original - the shame!!

The correct equation would have been: velocity angle = arccos( velocityX / sqrt(velocityX^2 + velocityY^2) )

A big fan of JavaScript.