ok thanks for reply..
ok so..
Code:
if PerfCount.PhysicsElapsedTime >= (1 / 60) then begin
NewtonUpdate(NewtonWorld, 1 / 60);
PerfCount.PhysicsElapsedTime := PerfCount.PhysicsElapsedTime - (1 / 60);
end;
i have added this for newton update (which seems to be working)
Code:
procedure TNewtonBox.Render;
var
v: Integer;
matWorld: TD3DMatrix;
begin
NewtonBodyGetMatrix(NewtonBody, @matWorld.m[0,0]);
Engine.ResMan.DX_Device.SetTransform(D3DTS_WORLD, matWorld);
v := 0;
while (v < Model.NumMaterials) do begin
// Set the material and texture for this subset
Engine.ResMan.DX_Device.SetMaterial(Model.pMeshMaterials[v]);
Engine.ResMan.DX_Device.SetTexture(0, Model.pMeshTextures[v]);
// Draw the mesh subset
Model.pMesh.DrawSubset(v);
Inc(v);
end;
end;
i am using this for rendering the box, how would i go about transforming via vertices rather then matrix? thanks again you have been very helpful.
Bookmarks