Follow

Hm. So despite the fact that my vector calculations are very probably hacky and wrong, my next problem is with precision.

My map uses integers. Makes sense, it's a roguelike, so it needs whole X, Y (and Z, as I have depth) coordinates.

If I pitch -30 degrees at low velocity, my new Z-coordinate is: 0.0 < Z < 1.0. Which means I don't move. Or I round, and always move at least 1 square.

I'm going to have to convert everything to floats and translate to ints once position changes by >= 1.0. 🤣

Sign in to participate in the conversation
Mental Health dot Social

A safe, social, virtual space for anyone interested in mental health and its issues. Whether you're a service user, someone with lived or living experience or a mental health professional, feel free to join, hang out and chat about anything.

Non-judgemental, open-minded and with a zero-tolerance policy on abusive behaviour, harassment and discrimination.

If you are experiencing a suicidal crisis, please call one of the numbers below and talk to someone - they will be able to help.