Sorry, I think in degrees. So I usually convert my degree numbers to radians. Yes, 90 degrees would be half pi. 180 would be pi. And 270 would be pi and a half. 360 would be 0 or two pi... mmm... I wish I had 2 pi's...Taehl wrote:You mean, math.pi*.5, right? Rotating by 90 radians would be like rotating by 5156 degrees...
Pointing an image
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Pointing an image
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Pointing an image
I'd recommend Tau for radians instead of Pi.
It's easy to remember because if you replace math.tau with 1 in your head, that's the fraction of a circle you get.
Code: Select all
math.tau = math.pi * 2
math.tau -- 360 or 0 deg
math.tau / 2 -- 180
math.tau / 4 -- 90
math.tau / 8 -- 45
-- and so on...
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Pointing an image
I knew you'd say that when I read Jasoco's post.BlackBulletIV wrote:I'd recommend Tau for radians instead of Pi.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Pointing an image
I still prefer to use degrees.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Pointing an image
Ha ha, but what's wrong with Tau? It's better than Pi (and hey, you get twice as much pie too! ).Robin wrote:I knew you'd say that when I read Jasoco's post.BlackBulletIV wrote:I'd recommend Tau for radians instead of Pi.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Pointing an image
I prefer pi (that is to say, radians) to tau, degrees, quaternions, or anything else.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Pointing an image
Why's that? I'm interested to know. How is \( \frac{\pi}{2} \) to make a quater circle more logical than \( \frac{\tau}{4} \)?
Re: Pointing an image
And yet again, more problems. Now the characters face isnt looking at the mouse, but the characters top left corner is.
And just for you to see it, heres the .love file.
And just for you to see it, heres the .love file.
- Attachments
-
- CharMoving.love
- (1.63 KiB) Downloaded 113 times
I can't come up with a good signature!
Re: Pointing an image
I got it working by using the love.graphics.draw function's offset x and offset y.
Thanks guys!
Thanks guys!
I can't come up with a good signature!
Re: Pointing an image
I was just about to say that, but then you edited the post.Anxiety wrote:I got it working by using the love.graphics.draw function's offset x and offset y.
Cause im making a game, which is so far basically like yours, and I did that too.
Who is online
Users browsing this forum: No registered users and 4 guests