Is there a sensible method of using love.physics for planetoids?

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.
Post Reply
FatalMarshmallow
Prole
Posts: 17
Joined: Mon Jul 30, 2012 9:15 pm

Is there a sensible method of using love.physics for planetoids?

Post by FatalMarshmallow »

When a world is created using love.physics.newWorld it has set gravity in both the x and y planes, which to me seems like it will be unusable for attracting objects towards a planetoid with position and mass from all directions. This is very early stages at the moment, but am I just being an idiot, or should I start looking at long and complex work-arounds? Many thanks. :)

Oh, I guess here is a .love file which is mainly just the love.physics tutorial I've editted to resemble some form of moon on a string. :/
Attachments
example.love
(906 Bytes) Downloaded 112 times
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Is there a sensible method of using love.physics for planetoids?

Post by raidho36 »

You'll have to simulate your own gravity. Apply force to all bodies in proportion with their weight in the direction and magnitude you need.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests