Inside3D!
     

Camera View Help

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
RooT



Joined: 07 Sep 2005
Posts: 40

PostPosted: Wed May 10, 2006 5:18 am    Post subject: Camera View Help Reply with quote

im stumped on a camera problem. I am making a rts style sky camera, but I cant figre out the how to adjust its angles.
cam)make is run when the player spawns, and cam_move runs every player think. i need the angle to be offset to about 45 degrees, but all I can change is the position of the camera, not were it looks. thanks in advance

Code:

void() Cam_Move =
{
   makevectors (self.v_angle);
   traceline ((self.origin + self.view_ofs),((((self.origin + self.view_ofs) + (v_forward * self.camangle_z)) + (v_up * self.camangle_x)) + (v_right * self.camangle_y)),FALSE,self);
   setorigin (self.camera,trace_endpos);
   WriteByte (MSG_ONE,5);
   WriteEntity (MSG_ONE,self.camera);
   self.camera.angles = '0 45 0';
};
void() Cam_Make =
{
   local entity camerab;

   camerab = spawn ();
   self.camera = camerab;
   camerab.classname = "camera";
   camerab.movetype = MOVETYPE_FLY;
   camerab.solid = SOLID_NOT;
   setmodel (camerab,"progs/null.mdl");
   setsize (camerab,'0 0 0','0 0 0');
   makevectors (self.v_angle);
   traceline ((self.origin + self.view_ofs),(((self.origin + self.view_ofs) + (v_forward * -64.000))),FALSE,self);
   self.camangle = '120 0 -184';
   setorigin (camerab,trace_endpos);
   camerab.angles = self.angles;
   msg_entity = self;
   WriteByte (MSG_ONE,5);
   WriteEntity (MSG_ONE,camerab);
   WriteByte (MSG_ONE,10);
   WriteAngle (MSG_ONE,camerab.angles_x);
   WriteAngle (MSG_ONE,camerab.angles_y);
   WriteAngle (MSG_ONE,camerab.angles_z);
};

_________________
My mod site!
Mod Status:
Turret Defense: 30%
UPS: 45%
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group