Помощь с tilt камеры уже не нужна, сам решил все. Вот пример, если кому надо:
Код
action players_code() // attach this action to your player
{
var movement_speed = 10; // movement speed
VECTOR temp;
ANGLE temp_angles;
set (my, INVISIBLE); // 1st person player
player = my; // I'm the player
while (1)
{
my.pan -= 7 * mouse_force.x * time_step;
camera.x = my.x;
camera.y = my.y;
camera.z = my.z + 50 + 1.1 * sin(my.skill44); // play with 50 and 1.1
camera.pan = my.pan;
camera.tilt = my.tilt;
vec_set (temp.x, my.x); // trace 10,000 quants below the player
temp.z -= 10000;
temp.z = -c_trace (my.x, temp.x, IGNORE_ME | IGNORE_PASSABLE | USE_BOX) - 2; // play with 2
temp.x = movement_speed * (key_w - key_s) * time_step;
temp.y = movement_speed * (key_a - key_d) * 0.6 * time_step;
c_move (my, temp.x, nullvector, IGNORE_PASSABLE | GLIDE);
temp_angles.tilt = 0;
temp_angles.roll = 0;
temp_angles.pan = -my.pan;
vec_rotate(normal, temp_angles);
temp_angles.tilt = -asin(normal.x);
temp_angles.roll = -asin(normal.y);
my.tilt += 0.01 * ang(temp_angles.tilt - my.tilt); // play with 0.1
my.roll += 0.01 * ang(temp_angles.roll - my.roll); // play with 0.1
wait (1);
}
}
Нужна помощь с прицеливанием, помогите пожалуйста.