question about framework camera

how can you use the camera.FrameMove(elapsedTime) with out a effects file, im using for all my view, world and projection matrix just the basic setup for it

device.Transform.World = Matrix....ect....

but I would really like to have the option of using the FrameMove function that the ModelViewerCamera has. anyone have any ideas on how I can use this...



Answer this question

question about framework camera

  • TomJones

    after messing with this for a few hours this is what I came up with
    I set 2 matrix one with:

    worldMatrix = Matrix.Transformation(new Vector3(), Quaternion.Identity, new Vector3(1,1,1), new Vector3(), Quaternion.RotationMatrix(Matrix.RotationY(rotationz/(float)Math.PI)), new Vector3(-8.0F, 5.5F, 20.0F));

    and the other one:

    camera.WorldMatrix.Transform (new Vector3(), Quaternion.Identity, new Vector3(1,1,1), new Vector3(), Quaternion.RotationMatrix(Matrix.RotationY(rotationz/(float)Math.PI)), new Vector3(-8.0F, 5.5F, 20.0F));

    then I put in this line:

    device.Transform.World = camera.WorldMatrix * worldMatrix;

    now if I set the last line of code any other way it wont work
    right now it works great but I have no idea why, can someone explain this to me



  • fgalal

    Also check out the ask the zman samples - they don't have any fx files and use the model view camera. http://msdn.microsoft.com/coding4fun/zman/

  • MrDoomMaster

    If you have a look at the simple2d example in the SDK it uses the model viewer camera with out using an effect file. You should be able to adapt the same code indside a 3d application.

  • question about framework camera