Posted By: V_Sola
incorrect camera-movement - 02/08/09 19:07
hi guys,
it's me again. I want my camera to be constantly behind my model but i don't manage to fix up an correct c_move-function.
Can anyone help me?
that's my code:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
ENTITY* wizard;
////////////////////////////////////////////////////////////////////
}
function main()
{
//video_mode = 7; // 800x600 pixels
video_switch (8,32,1);
level_load ("Drohne_Level_1.wmb");
}
action wizard_with_pointer()
{
wizard = my;
my.ambient = 100;
while(1)
{
VECTOR speed;
my.pan += -50 * mouse_force.x * time_step;
speed.x += 5 * (key_a - key_d) * time_step;
speed.y += 5 * (key_s - key_w) * time_step;
c_move (my,speed,nullvector,IGNORE_PASSABLE | GLIDE);
camera.x = my.x;
camera.y = my.y - 150;
camera.z = my.z + 25;
camera.pan = my.pan + 270;
camera.tilt = - 12;
my.red = 100;
wait(1);
}
}
action wizard_simple()
{
my.ambient = 100;
}
it's me again. I want my camera to be constantly behind my model but i don't manage to fix up an correct c_move-function.
Can anyone help me?
that's my code:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
ENTITY* wizard;
////////////////////////////////////////////////////////////////////
}
function main()
{
//video_mode = 7; // 800x600 pixels
video_switch (8,32,1);
level_load ("Drohne_Level_1.wmb");
}
action wizard_with_pointer()
{
wizard = my;
my.ambient = 100;
while(1)
{
VECTOR speed;
my.pan += -50 * mouse_force.x * time_step;
speed.x += 5 * (key_a - key_d) * time_step;
speed.y += 5 * (key_s - key_w) * time_step;
c_move (my,speed,nullvector,IGNORE_PASSABLE | GLIDE);
camera.x = my.x;
camera.y = my.y - 150;
camera.z = my.z + 25;
camera.pan = my.pan + 270;
camera.tilt = - 12;
my.red = 100;
wait(1);
}
}
action wizard_simple()
{
my.ambient = 100;
}