I'm using Lua for my actors and have made a bit of the Bullet functions available to it via LuaBridge, so I'm calling the relevant functions directly. As for how I'm doing movement, every actor has an assigned rigid body; some have additional rigid bodies for things like hitboxes etc. I use setLinearVelocity for whichever actor is moving, and have it set immediately to the actors maximum movement speed for now. I've read setLinearVelocity begins to function oddly at higher/lower frame rates; swapping to applyImpulse and applyForce both did not achieve the desired movement effect and also had the same problems at higher frame rates. I'm kind of at a loss - the only thing I can think of is the collision callback is clearing forces quicker than they can be reapplied but with the mediawiki down I've been having trouble verifying if that was mentioned on the old articles, or if that's indeed what occurs (and as such if there's a better callback setup than what was given on the wiki.) Thanks so much!
Code: Select all
while(run) render get current time pass delta time to stepSimulation scene events(things like running timers/callbacks, locking rigid bodies to mesh bones etc.) dt-game tick (set to 8) while(dt>=game tick) input polling scene update (movement, ai decisions, setting states/animations) gl swap
EDIT: Forgot to mention I'm using the 2.87 release of Bullet!