Finding the distance between two points

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Finding the distance between two points

Post by xXxMoNkEyMaNxXx »

There are no units.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Finding the distance between two points

Post by raidho36 »

More specifically, they are just units. An arbitrary math thing.
User avatar
Le Codex
Prole
Posts: 31
Joined: Thu Feb 09, 2017 10:56 am
Location: France
Contact:

Re: Finding the distance between two points

Post by Le Codex »

These functions return distances in pixels. Imagine a circle around your object that has the distance in pixel for radius.

Code: Select all

if your.timeSpeed > 0 then universe:update(dt) else universe:destroy() end
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Finding the distance between two points

Post by Jasoco »

They're still arbitrary. You can use them for pixels of course. You can also use them for tiles or in-game measurements of whatever you choose. It's just math.

You didn't need to bump this thread. lol
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Finding the distance between two points

Post by zorg »

People should get a badge under their avatars for /pointlessly/ necroing threads, maybe everlasting shame would be a nice enough deterrent. :P
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 64 guests