First sorry for my english;)
How to create 3rd camera but... not changing pan to roll? It means... if you have f.e. a plane and move plane's nose up(tilt), the camera.pan is changing to roll. And if the plane is in vertical position, you can't turn (pan)to wing because camera only roll around one point.
This is a part of my code:

var camera_dist[3] = 25,0,-6; (straight behind & a little up)
- dummy entity(always front to the player, invisible, moving by mouse pointer)
while(1)
{
temp.x = MOUSE_POS.x;
temp.y = MOUSE_POS.y;
temp.z = 200;
vec_for_screen(temp,CAMERA);
vec_set(my.x, temp);
wait(1);
}

- player's ship (spaceship turning to the dummy entity, looking at him)
while(1)
{
vec_set(temp,glupek.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp);
wait(1);
}

- camera (always behind the player with a little delay)
while(1)
{
if(player != null)
{
CAMERA.pan += 0.1 * ang(player.pan-CAMERA.pan);
CAMERA.tilt += 0.1 * ang(player.tilt-CAMERA.tilt);
vec_set(temp,camera_dist);
Vec_rotate(temp,player.PAN);
CAMERA.X += 0.3*(player.X - temp.X - CAMERA.X);
CAMERA.Y += 0.3*(player.Y - temp.Y - CAMERA.Y);
CAMERA.Z += 0.3*(player.Z - temp.Z - CAMERA.Z);
}
wait(1);
}
I want to have always "full" 180 degree pan, no matter what the tilt is. And I know, that on the oposite side of sphere I will fly on by beck, but that the point. I want f.e. fly on my beck or 45 degree and still pan should be a pan not roll.
I hope You understand what I mean and I'll be waiting for reply.
Tom

Last edited by tompo; 04/11/07 23:56.

Never say never.