Open David-Luis opened 11 years ago
How you set the time step? it's must small enough make the simulation precise.
I use this code: _physicsWorld.step(elapsedTime, maxSubStepsPhysics, _timeStep);
where:
maxSubStepsPhysics:int = 3 _timeStep:Number = 1/60 elapsedTime = varies between 1/30 - 1/60 (I updated the demo, to make sure the value is between this values, you have to clear the browser cache)
I'm using Away3D 4.1 and AwayPhysics v1.0 alpha (13-11-2012)
not sure what cause this, you can try to adjust some property of AWPWheelInfo, like damping, friction etc.
The problem is not on that values, is the use of variable step. If I use fixed step, the problem doesn't appear:
_physicsWorld.step(_timeStep, 1, _timeStep);
where: _timeStep = 1/60
You can see it in this demo: https://dl.dropbox.com/u/28132609/demo_car_away_fixed/index.html
you find solution in this thread http://away3d.com/forum/viewthread/4014/
in AwayPhysics.c line 944 vehicle->updateWheelTransform(j,true); change to false and rebuild swc with flascc
On Wed, Mar 13, 2013 at 1:16 PM, louis87 notifications@github.com wrote:
The problem is not on that value, is the use of variable stop. If I use fixed step, the problem doesn't appear:
_physicsWorld.step(_timeStep, 1, _timeStep);
where: _timeStep = 1/60
You can see it in this demo: https://dl.dropbox.com/u/28132609/demo_car_away_fixed/index.html
— Reply to this email directly or view it on GitHubhttps://github.com/away3d/awayphysics-core-fp11/issues/12#issuecomment-14837847 .
LoTh - Freelance flash as3 / 3D website http://perso.numericable.fr/chamaslot/ | bloghttp://3dflashlo.wordpress.com
ok, thanks!
There is a bug that make the wheels and the car body make strange movements when use a variable delta time.
Here is a demo: (takes a few seconds to load) https://dl.dropbox.com/u/28132609/demo_car_away/index.html
Use arrows to control the car. You can see the bug when the car is turning.
Best regards