but if i rotate for example my object with the .AngularVelocity the object rotate in the axis, but i dont know how indicates him when he is in another rotation for move again in the correct angle
sorry my bad english, is not my first languaje i hope you understand with this draw
this is i want to do
If you want to get the entity's local up direction, you can use the entity.OrientationMatrix.Up property. It is equivalent to transforming (0, 1, 0) by the OrientationMatrix, but due to the properties of orthonormal transforms the axis can be cheaply pulled directly out of the matrix's components.
There are equivalent properties for Right, Forward, and so on.
i recently download the demo in the main page on codeplex and this is exactly what i want to do, a first person camera museum for my final project in the university,
then i have another question how do you do the collision between the camera and the objects in the space?
there are something like "camera.radious" or something what collides with the entities in the space?
or do the camera work as an object
thanks for all norbo
The camera itself is just a nonphysical helper class that creates a view matrix to render things with.
In the demos, when you're walking around as a character, the camera is positioned to follow the character's body around. All the collision and movement is handled by the CharacterController. Similarly, when you use a vehicle in the demos, the camera follows the vehicle around.
If you wanted to have a free flying camera that collided with things, you could create a sphere for the camera to follow around and then change the sphere's velocity to match user input. It would look something like this:
var sphere = new Sphere(new Vector3(), 1, 10);
//Don't let gravity pull down the sphere.
sphere.IsAffectedByGravity = false;
//There's no reason for the sphere to rotate due to collisions. Set its inertia tensor to infinity.
sphere.LocalInertiaTensorInverse = new Matrix3x3();
//Make it easy to slide.
sphere.Material.KineticFriction = 0;
sphere.Material.StaticFriction = 0;
...
//During updates, change the velocity of the sphere to make it move around.
if (MoveForwardKeyPressed)
sphere.LinearVelocity = Camera.WorldMatrix.Forward * speed;