|
Post by Ratty Rat on Feb 8, 2007 12:22:19 GMT 1
Using Newton 1.32 and latest DBPro version (6.31?)
What I want to do is: CREATE/LOAD AN OBJECT SCALE OBJECT ROTATE THE OBJECT POSITION THE OBJECT ADD THE OBJECT TO THE NEWTON COLLISION TREE The commands go something like this: MAKE OBJECT OBJ, MS, I SCALE OBJECT OBJ, SX, SY, SZ ROTATE OBJECT OBJ, AX, AY, AZ POSITION OBJECT OBJ, XP, YP, ZP REM THE NEWTON BIT COL = NDB_NewtonCreateTreeCollision( OBJ ) BODY = NDB_NewtonCreateBody( COL ) NDB_NewtonReleaseCollision COL But when the game runs the collision tree is in the wrong place, looking at the wireframe collision map it shows the objects collision tree stuck at the origin (IE position 0,0,0), although it does seem to have got the rotation and scale correct. Any ideas how to fix this? Thanks, Ratty
|
|
toggy
New Member
Posts: 3
|
Post by toggy on Mar 6, 2007 23:46:52 GMT 1
Add this after NDB_NewtonReleaseCollision COL
NDB_BuildMatrix AX, AY, AZ,XP, YP, ZP NDB_NewtonBodySetMatrix BODY
|
|