Hi ,

i have a problem with a camera code:

vec_diff(tempVect,camera.x, my.x);
tempVect.z = 0;
vec_normalize(tempVect,CAMERA_OFFSET);

currCameraHeight += mouse_force.y * MOUSE_FACTOR * time_step;
tempVect.z = clamp(currCameraHeight, -CAMERA_OFFSET/3, CAMERA_OFFSET/3);

vec_rotateaxis(tempVect, vector(0,0,1), mouse_force.x * MOUSE_FACTOR * time_step) ;

vec_add(tempVect, my.x);
if(c_trace(my.x, tempVect, IGNORE_ME | IGNORE_PASSABLE)!=0){
vec_set(camera.x, target);
}
else{
vec_set(camera.x, tempVect);
}

vec_diff(tempVect,my.x, camera.x);
vec_to_angle(camera.pan,tempVect);


I need a Offset Vector for put the camera a little bit in left position and rotate for a walking like some rpg's with an Offset for a shooter position.

like the same game : state of decay, Batman, assasins creed and so on.

The player must be walk a circle with the keys a and d with a left side offset .



I hope you understand my problem an can help, please help.
thank you for you time.

Best regards

Last edited by Sammy32; 06/28/13 13:32.

- 3d Gamestudio Commercial -
- ANET Pro -
<JAVA | PHP | HTML | Flash > DEVELOPER