Applying perspective on distance calculations.

  • Hi. I'm trying to do a game that uses a beat'em'up-style perspective. The tech demo I've been working on is here:

    ottomicgames.freeiz.com

    I'm implementing enemies right now, but I have a problem that's nagging me since I've started working in the game and that I would really like to solve: I need to know what's the distance between an object and my player while accounting for the perspective. For example, I'll set an enemy to "prowl" (i.e: move in circles) around the player at a certain distance. However, the enemy will do so at (let's say 200) pixels always, but what I want is for it to prowl at such a distance that while its absolute X and Y might be different from 200, it's really at 200 "tile-pixels" from the player. I hope I'm explaining myself here. I've been looking around, but I haven't found a way to do so without tons of math and projections, and I would like to know if someone has a quick or easy way for me to achieve this with Construct. Thanks in advance! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)