Constant Acceleration

Hello, Im making a game sort of like velocibox where you have to dodge walls. I was wondering if there was an easy way to keep my player accelerating to make the game faster as time goes on. I dont want to add to 0 but rather add to the last velocity. Say, I wanted to accelerate .1 in the y axis per second, is that possible?

a = F / m
v(t) = t*a

In short, if you haven’t studied highschool physics:
You want to apply force to the object.
You can do it in the motion actuator.


acceleration_equals_force_divided_by_mass.blend (472 KB)

from bge import logic
cont = logic.getCurrentController()
own = cont.owner

increment = 0.01
own.setLinearVelocity([own.getLinearVelocity().x + increment, 0, 0], False)

Own linear velocity on the x axis increases by 0.01 every frame.
Should work (untested).

is it possible to make an object accelerate while having character physics (collide with objects, affected by gravity). Your method works, but it uses dynamic physics

“(collide with objects, affected by gravity)”
Dynamic physics does have those features.
Character physics is weird and buggy in my opinion.

Yeah, don’t use character physics. Rather set up your own character system using Python. It’s really simple and will result in, in my opinion, more fluid and realistic movement.

why is it that when I use this code, the block falls down way slower than if I dont apply this code?