Applying perspective on distance calculations.

Get help using Construct 2

Post » Fri Feb 28, 2014 5:50 pm

Message: Ottomic can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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:

http://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! :D
B
7
S
1
Posts: 11
Reputation: 574

Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo and 15 guests