Addaptive dt for physics simulation