I've tried to use Body.Orientation() method to rotate an object which has a collision skin attached to it. However it seems that only the model rotates, but the body itself keeps at its original position… Am i doing something wrong, or this is not the adequate method to rotate bodies?
Body.Orientation should work for rotating your objects. Make sure that when you initialize your CollisionSkin object you register your body object with it like so:
body = new Body(); collision = new CollisionSkin(body);
Also make sure that if you're changing the orientation of your body every frame, you do so using a child class of the Controller parent class (JigLibX.Physics). There are a few other posts in this forum regarding that if you have more questions.
Thanks , ill try that. But what do you mean , i cant simply set on my main game class ( in the Update Method or w/e) the body.Orientation?
i Tried that, didnt work. i have a class very similar to the tutorial ( box actor ) , with the
body = new Body();
collision = new CollisionSkin(body);
and it has this method :
public void ChangeOrientation(Matrix orientation)
and only the model is rotating, not the body itself.
Ive tried a couple things and i've realised that the Body.SetOrientation() method is probably obsolete… since changing the orientation with the moveTo(vector3 pos, matrix orientation) works.