First of all, welcome to the forum
codemasterpl wrote:How do i:
- place a created object in X,Y,Z location
First create the collision shape with NewtonCreateBody, NewtonCreateBox, etc..
Then create a body to hold the shape with NewtonCreateBody and place it with NewtonBodySetMatrix, set it's mass with NewtonBodySetMassMatrix (or else the body will be considered static).
codemasterpl wrote:- rotate that object
Inside the forcetorque callback you can apply this, as a proper way to interact with the object: NewtonBodyAddTorque, NewtonBodySetOmega
Alternate ways are: NewtonBodySetMatrix (set the orientation directly) OR using the Joint interface
codemasterpl wrote:- get it's position and rotation (required for rendering)
With NewtonBodySetTransformCallback you set a callback which will tell you when the body location and orientation changes, then you use NewtonBodyGetMatrix which gives you a standard 4x4 matrix that you can use as rendering matrix.