CSQC camera?
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
CSQC camera?
is it possible to code a sidescroller camera that doesnt move with the character in csqc?
if so, where do i start? i may need a bit of assistance in this. i honestly am just jumping into this hoping to accomplish and learn something at the same time.
if so, where do i start? i may need a bit of assistance in this. i honestly am just jumping into this hoping to accomplish and learn something at the same time.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
quick pseudo code for csqc main loop:
clearscene();
setviewprop(ORIGIN, neworg);
setviewprop(ANGLES, newang);
addentities(MASK_ENGINE|MASK_VIEWMODEL);
renderscene();
drawcustomhuddoodads();
how you work out the neworg and newang is up to you.
it is feasable to use the engine defaults for the most part, and override only ORIGIN_X, as well as angles. this would cause the view to track with the normal location, but offset at a fixed position upon one axis. you can then force the angles to face the player.
you probably also want to force their viewangles too.
the 'proper' way to get the origin is actually quite awkward, although if you're using fte, registering the player model for entity update notifications may be quite handy - the engine will do all the deltaing/interpolation for you.
clearscene();
setviewprop(ORIGIN, neworg);
setviewprop(ANGLES, newang);
addentities(MASK_ENGINE|MASK_VIEWMODEL);
renderscene();
drawcustomhuddoodads();
how you work out the neworg and newang is up to you.
it is feasable to use the engine defaults for the most part, and override only ORIGIN_X, as well as angles. this would cause the view to track with the normal location, but offset at a fixed position upon one axis. you can then force the angles to face the player.
you probably also want to force their viewangles too.
the 'proper' way to get the origin is actually quite awkward, although if you're using fte, registering the player model for entity update notifications may be quite handy - the engine will do all the deltaing/interpolation for you.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest