moving the players view?
moving the players view?
how would i go about doing this in csqc? i assume it has something to do with this : const float VF_VIEWPORT = 7; , but im not sure.
Re: moving the players view?
first call clearscene(). this resets everything to defaults.
to move the 2d viewport around the screen:
setviewprop(VF_MIN, topleft);
setviewprop(VF_SIZE, topright-topleft);
alternatively:
setviewprop(VF_VIEWPORT, topleft, topright-topleft);
because we're lazy:
setviewprop(VF_DRAWENGINESBAR, TRUE);
setviewprop(VF_DRAWCROSSHAIR, TRUE);
then call addentities as appropriate.
to move the camera around the world, change VF_ORIGIN and VF_ANGLES. good luck determining the desired location. you can do this drawing the predraw function of the player entity if you need, and have one set up.
then call renderscene() to shove it onto screen.
repeat with different subregions
to move the 2d viewport around the screen:
setviewprop(VF_MIN, topleft);
setviewprop(VF_SIZE, topright-topleft);
alternatively:
setviewprop(VF_VIEWPORT, topleft, topright-topleft);
because we're lazy:
setviewprop(VF_DRAWENGINESBAR, TRUE);
setviewprop(VF_DRAWCROSSHAIR, TRUE);
then call addentities as appropriate.
to move the camera around the world, change VF_ORIGIN and VF_ANGLES. good luck determining the desired location. you can do this drawing the predraw function of the player entity if you need, and have one set up.
then call renderscene() to shove it onto screen.
repeat with different subregions
Re: moving the players view?
so i tried to set VF_ORIGIN and just got some warnings ?
in function CSQC_UpdateView (line 129),
View.qc:12: warning Q106: Assignment to lvalue
csplat.qc:251: float VF_ORIGIN_Y is defined here
View.qc:12: warning Q106: Assignment to constant VF_ORIGIN_Y
csplat.qc:251: float VF_ORIGIN_Y is defined here
Compile finished: ../csprogs.dat
Done. 2 warnings
in function CSQC_UpdateView (line 129),
View.qc:12: warning Q106: Assignment to lvalue
csplat.qc:251: float VF_ORIGIN_Y is defined here
View.qc:12: warning Q106: Assignment to constant VF_ORIGIN_Y
csplat.qc:251: float VF_ORIGIN_Y is defined here
Compile finished: ../csprogs.dat
Done. 2 warnings
Re: moving the players view?
try setting it a different way... hint: read my previous post.
Re: moving the players view?
thanks got it =)