|
|

楼主 |
发表于 2006-12-21 23:46:00
|
显示全部楼层
Re:我在读Advanced Animation with DirectX 有问题求教
哦。。。我书没往下看,后面一页就有补充说明了。
Also, you need to factor in time again (also stored as a floating−point variable, Time), which states how
much velocity has built up over a period of time (measured in seconds) and how much velocity has been
applied to the position of the body.
// vecVelocity = D3DXVECTOR3 object
// Mass = float variable
// vecForce = D3DXVECTOR3 object w/force to apply
// Scale force (which represents acceleration) by mass
// and add directly to velocity
vecVelocity += Time * (vecForce / Mass);
// Add velocity to position
vecPosition += Time * vecVelocity;
我太性急了,呵呵。。。就说嘛,这样才合理 |
|