Velocity getting clamped to upper limit - help!

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
invisisci
Prole
Posts: 12
Joined: Sun Feb 01, 2009 5:35 am

Velocity getting clamped to upper limit - help!

Post by invisisci »

Hi there,

I'm hitting an issue where I can't make physics objects move faster than an upper limit of ~200 units (I'm not sure what the units are).

The attached .love file demonstrates the issue. Use the arrow keys to move around, and notice that velocity is clamped to ~200. I show the end frame velocity that my code is trying to apply, but it always gets set back to 200.

You can press 'm' to toggle the mass - the object should move much faster from the same impulse, but instead it's still clamped to 200.

Does Love (or Box2D) impose a terminal velocity? Can I change it? I want stuff to move faster!

Thanks in advance for any help...
Attachments
TerminalVelocity.love
Simple app that demonstrates the problem
(2.79 KiB) Downloaded 230 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Velocity getting clamped to upper limit - help!

Post by bartbes »

Several ways:
  • Call the world update more, or with a bigger dt, this makes the physics engine think it goes faster, so dt*2 makes it think it goes twice as fast, remember, everything goes twice as fast.
  • The better solution: Scale, I'd recommend CAMERA, helps with graphics as well.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Velocity getting clamped to upper limit - help!

Post by rude »

invisisci wrote: Does Love (or Box2D) impose a terminal velocity? Can I change it? I want stuff to move faster!
Box2D imposes a limitation of 200 m/s, which appears as 200 pixels per second in LÖVE. See this thread.
invisisci
Prole
Posts: 12
Joined: Sun Feb 01, 2009 5:35 am

Re: Velocity getting clamped to upper limit - help!

Post by invisisci »

Thanks for the replies... helped a lot!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests