Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi,
There's an issue with the 8-Direction behavior that causes diagonal movement to be slower than movement in cardinal directions.
My character is supposed to move 60 pixels per second in any given direction. This works with cardinal directions, but when I move in 2 directions (for example, down and left) the character moves 42 pixels per second in both directions instead.
How do I fix this?
Develop games in your browser. Powerful, performant & highly capable.
so basically let's try this:
measure one tick of movement!!
measure the distance from (0, 0) to (60, 0)
measure the distance from (0, 0) to (42.42, 42.42)
The result is the answer
so basically let's try this: measure one tick of movement!! measure the distance from (0, 0) to (60, 0) measure the distance from (0, 0) to (42.42, 42.42) The result is the answer
I’m not sure I follow. My question was asking how to get the diagonal movement speed to match the cardinal movement speed, as 8-Direction diagonal movement seems to always be slower than cardinal movement. I want them to be the same speed.
The diagonal speed is already the same as the cardinal speed. The magnitude of the vector (0, 60) is the same as the magnitude of the vector (42.42, 42.42).