Andy Gilbert Posted August 13, 2010 Share Posted August 13, 2010 Im finding odd things happeneing with physics? To explain, i have one variable "up", that is a float that that i increase with a keydown. I apply that var to an upward force on the cube. I increase it, until the cube slowly starts to go up, at that point i let go, if i leave it slowly risingit seems the higehr it gets the more force it gets? for instance...i noticed that to get the cube to rise VERy slowly the number is say 2, and when its only just rised a bit in infront of the camera if i lower the var to say 1.95 it will start to lower again. But if i let the cube rise and rise it seems to get faster and faster without me rising the var, and then to get it to come back down i have to lower the var to like 1, where when it was already lower down, i only had to drop to 1.95 to make it go down? Why is this? Andy Quote The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
DaDonik Posted August 13, 2010 Share Posted August 13, 2010 Sounds like you call AddBodyForce() every loop? If it's the case, then the problem is clear. AddBodyForce() applys the force to the force the body already has. It will get faster and faster over time. Edit: Check the CalcBodyVelocity command. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.