dim3 Forum

Full Version: Zero G physics like this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Looking at the Audi TT script it seems easier then I thought to do zero G physics as they would be in space:
- once accelerated, you keep your speed
- you can turn on the spot
- you don't have to go in the direction you are looking
- no reversing
- no breaking

obj.setting.turnOnlyWhenMoving=false;
obj.setting.restrictPlayerTurning=false;
obj.setting.quickReverse=false;
obj.setting.sideStep=false;
obj.setting.jump=false;
obj.setting.duck=false;

obj.turnSpeed.motionAir=0;
obj.forwardSpeed.deceleration=0;
obj.forwardSpeed.decelerationAir=0;

What's these?

obj.turnSpeed.facingWalk=1.5;
obj.turnSpeed.motionWalk=0.6;
obj.turnSpeed.facingAir=0;

What is left for scripting or hard coding?
Trust me it wont work yet. I suggest doing what you can and leaving it until the next release with these fixes. I have already talked to Brian.
IIRC, the reason Zero-G physics (or, more appropriately, Zero-Friction physics) don't work is because your momentum in dim3 is always in the same direction as your acceleration. If you accelerate and then turn 180ยบ, you start moving in the opposite direction. This is usually the right behaviour when you are on the ground (unless you're, say, driving on ice), but it's almost always wrong when you're in the air.
Right it has to do with how Brian calculates his physics I believe. A realistic physics engine should have all objects move like real objects and then apply certain forces/resistances to them (aka acceleration, friction, etc) I don't think that's quite how it's done right now. For the player, anyways. Brian this is a suggestion, btw. Would be nice to control the player's physics based on friction to the ground, air, etc, as well as with all other objects. I think it would make things more realistic.
Yeah yeah, I see. Forget it then Wink
You guys seem to have missed the point of my project this is something I'll be working on.
Reference URL's