Hi all
I added a floor body and happens the same !.
look this:
http://www.youtube.com/watch?v=rFMunew0vpMMy code:
NewtonPhysicsManager>>initialize
"Initialize the receiver"
| treeCollision extBox |
world := NewtonWorld new.
world
defaultPlatformArchitecture;"0"
defaultSolverModel; "1"
defaultThreadCount;"0"
defaultFrictionModel."adaptative"
treeCollision := NewtonWorldParser parse: self parent currentSpace to: world.
extBox := treeCollision defaultCalculateAABB.
level := NewtonRigidBody in: world withCollision: treeCollision.
level matrix: NewtonMatrix identity.
treeCollision release.
world size: extBox origin asNewtonVector corner: extBox corner asNewtonVector.
createBoxBody>>createBoxBody
"Create a Box body primitive"
| actor volume |
actor := self parent currentSpace actors first.
volume := actor dynamicExtBox asVolume.
collision := self createBoxFrom: volume.
body := NewtonRigidBody in: self world withCollision: collision.
self collision: nil. "Release collision"
body
massMatrix: 100.0
inertiaX: 1.0
inertiaY: 1.0
inertiaZ: 1.0;
setForceAndTorqueCallback: body;
setTransformCallback: actor
>>createFloorBody
"Create a floor body primitive"
| matrix |
matrix := JetXForm identity.
matrix position: (JetVector3D new y: -70).
collision := self createFloorCollision.
floor := NewtonRigidBody in: self world withCollision: self collision.
self collision: nil."Release collsion"
floor matrix: matrix asNewtonMatrix.
>>createFloorCollision
^NewtonBox
world: self world
sizeX: 200
sizeY: 10
sizeZ: 200
I look at the FAQ :
The collision tree does not seem to work correctly?
I thought that it could be something of this:
-faces been passed with the incorrect winding,
-incorrect coordinate system,
But it passes the same thing between two common rigid bodies"Not TreeCollision body"
On this:
-incorrect coordinate system. How is the simulation affected?
On this:
-faces been passed with the incorrect winding.
I pass the vertexes in both senses and happens the same !!.
Advanced thanks
kiko