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 »

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 »

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: Bing [Bot] and 4 guests