How to implement bullet time in Box2d?
I want to implement some sort of bullet time for my box2d app, googling around I found a post were they suggest to change the timestep (something like from 1/30 to 1/60) but its quickly flagged as bad practice, all I 开发者_运维技巧need is a basic on/off trigger for the slow motion, any ideas?
As of Box2D 2.0+ altering the time step doesn't negatively impact the simulation so simply use a smaller time step.
This would be done by changing the timestep.
Changing the timestep will change the simulation slightly, and make it less deterministic.
Whether that's acceptable depends on how essential it is that your physics simulation is deterministic.
If it's a single player game and not a hardcore game you probably don't need to worry about it.
I'm using bullet time in a single player iOS shooter and it's fine. The universe doesn't collapse.
精彩评论