love.physics - Increase simulation speed for one world

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
User avatar
Ovidios
Prole
Posts: 29
Joined: Thu Dec 04, 2014 12:00 pm
Location: Berlin, Germay

love.physics - Increase simulation speed for one world

Post by Ovidios »

Hey,

I've got 2 worlds with completely identical objects and I want both worlds to behave the same but one of them to simulate everything faster than the other one. I tried simply passing the world:update function 100*dt but that didn't work for some reason...

Thanks in advance! ^^
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: love.physics - Increase simulation speed for one world

Post by s-ol »

Ovidios wrote:Hey,

I've got 2 worlds with completely identical objects and I want both worlds to behave the same but one of them to simulate everything faster than the other one. I tried simply passing the world:update function 100*dt but that didn't work for some reason...

Thanks in advance! ^^
if you are doing it right exactly that will work - the error is in your code not in the concept, so without your code we cant help you any further. To increase physics accuracy in the second world you can consider calling world:update twice every frame maybe even.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: love.physics - Increase simulation speed for one world

Post by slime »

World:update will behave slightly differently if different delta times are used. So you'll have to call the second world's update multiple times per frame using love.update's delta time directly, rather than calling it once with a different delta time.
Post Reply

Who is online

Users browsing this forum: No registered users and 148 guests