//Can you reproduce problem with this code
// In windows ...place cam menu in the middle of screen at the top
// Drive forward and turn as fast as possible and get the cam menu
///////////////////////////////
#include <acknex.h>
#include <default.c>
#define PRAGMA_PATH "..\\Models";
ENTITY* car;
VECTOR* vec_tempmi= {x=0;y=0;z=0;}
short _bouge_o_n = 0; // used for evaluation in another function
action my_car()
{
car = my;
wait (2);
while (1)
{
// move the car using relative_speed
//------------------------------------------------
_bouge_o_n = c_move (my,vector(10 * (key_force.y) * time_step, 10 * (-key_force.x) * time_step, 0),
nullvector, IGNORE_MAPS | ACTIVATE_TRIGGER | IGNORE_CONTENT | USE_BOX | GLIDE | IGNORE_PASSABLE); //
//------------------------------------------------
// move the car with mouse left and right
if (mouse_left) {_bouge_o_n = c_move (my, vector(15*time_step, 0, 0), nullvector, GLIDE);}
if (mouse_right) {_bouge_o_n = c_move (my, vector(-15*time_step, 0, 0), nullvector, GLIDE);}
//----------------------
vec_set(camera.x,vector(my.x,my.y,my.z+30)); //place camera in first person mode
my.z = 8;// hold the car at same position on floor
//----------------------
// rotate the camera and the car around
my.pan -= 15 * mouse_force.x * time_step;
vec_diff(vec_tempmi,my.pan,camera.pan);
c_rotate (my,vec_tempmi , IGNORE_PASSABLE | USE_AXISR );
vec_set (camera.pan, my.pan );// the camera and the car have the same pan angle
wait (1);
}
}
function main()
{
video_mode = 7; // start resolution 800 x 600
video_screen = 1; // start in fullscreen mode
video_depth = 32; // 32 bit mode
// Starting with video_mode is now better
// The pointer was visible more often when starting the game with the following line
// video_set(800,600,32,1);
wait(1);
level_load ("homework18.wmb");
wait (2);
mouse_mode = 0;
mouse_pointer = 0;
}