MrGuest here is the picture u want. I hope u cen see the link its my first time when i upload something :)))
http://www.2shared.com/file/6555109/9fd5367f/IMAG0034.htmlAnyway here is the code ive done so far but is not working
entity* MainObject;
var distance;
var tempo;
var temp_dist;
var angle1;
var angle2 = 90;
string target_mdl = "hammer.mdl";
bmap mouse_pointerr = <cursred.bmp>;
action CameraPoint
{
MainObject = me;
my.invisible = on;
my.passable = on;
}
function Camera_Init()
{
wait(10);
while(1)
{
camera.z = MainObject.z + 10;
camera.x = MainObject.x;
camera.y = MainObject.y;
camera.pan = MainObject.pan;
camera.tilt = MainObject.tilt;
camera.roll = MainObject.roll;
wait(1);
}
}
function adjust_target()
{
vec_diff (temp,nullvector,target);
vec_to_angle (my.pan,temp);
}
function create_target()
{
var pos1;
var pos2;
pos1.x = mouse_pos.x;
pos1.y = mouse_pos.y;
pos1.z = 5;
vec_for_screen (pos1,camera);
pos2.x = mouse_pos.x;
pos2.y = mouse_pos.y;
pos2.z = 20000;
vec_for_screen (pos2,camera);
c_trace (pos1,pos2,IGNORE_PASSABLE);
distance = vec_length(target);
tempo.x = 0;
tempo.y = 0;
tempo.z = distance;
tempo.tilt = 0;
tempo.roll = 0;
ent_create (target_mdl,tempo,adjust_target);
wait(1);
angle1 = vec_to_angle (my.pan,temp);
vec_set(temp,nullvector);
while (angle2 > 0 )
{
temp_dist = cos(angle2)*distance;
temp.x = cos(angle1)*temp_dist;
temp.y = sin(angle1)*temp_dist;
temp.z = sin(angle2)*distance;
angle2 -=2*time;
c_move (target_mdl,temp,nullvector,IGNORE_PASSABLE);
wait(1);
}
}
function mouse_startup()
{
on_mouse_left = create_target;
mouse_mode = 2;
mouse_map = mouse_pointerr;
while(1)
{
vec_set (mouse_pos,mouse_cursor);
wait(1);
}
}
Well not all the code lines belong to me ,:)) some of them i copy/paste from others