How do I make this kind of cam?

Posted By: Jourdan

How do I make this kind of cam? - 04/05/08 09:41

I want to make camera to see the right side of the player. But if I use
 Code:
camera.pan = player.pan + 90

(+90 = to make the camera in the right side of player)
Everytime the player turn around, the cam turn around too. How do I make the camera shot the right side of the player but player's movement doesn't affect the camera?

Thanks in advance
Posted By: Jourdan

Re: How do I make this kind of cam? - 04/05/08 09:47

nevermind, I use
 Code:
camera.pan = - 270;


\:\)
Posted By: maslone1

Re: How do I make this kind of cam? - 04/05/08 09:53

don't write your code in a while loop!
your code shurly looks like this:

 Code:
 

function my_camera()
{
   while(1) {
   camera.pan = player.pan + 90;
  }
}



------ but you have to write it outside a loop like this
 Code:
 

function my_camera()
{
   camera.pan = player.pan + 90;

  while(1) {
   .........
   ....
   ...
  }
}




IF you move your entity in all 3 dimensions the code for the camera will be longer. But there are some tutorials in the aum magazine.

I hope this all help you to write the right code ;\)

CU
Marcel
Posted By: Jourdan

Re: How do I make this kind of cam? - 04/08/08 12:05

ok.. let meh test it.. thank you \:\)
© 2023 lite-C Forums