Getting the movement like this.

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
Nexion
Prole
Posts: 46
Joined: Fri Sep 05, 2008 1:40 pm

Re: Getting the movement like this.

Post by Nexion » Thu Oct 16, 2008 1:42 pm

surtic wrote:Yes, LÖVE uses degrees, but Lua (math.sin and math.cos) uses radians...

Ah well...
That's not that big of a deal; just use the conversion functions

math.rad(degrees) --Converts degrees to radians
math.deg(radians) --Converts radians to degrees

surtic
Citizen
Posts: 74
Joined: Sat Jul 12, 2008 12:18 am

Re: Getting the movement like this.

Post by surtic » Thu Oct 16, 2008 5:28 pm

Thanks for that... much easier than my original conversion.

I've been using Lua for some time now (a few years) but have never explored the math library - initially I was using an integer-only version that was running on an embedded system, so the math library was simply not available.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests