360 degree chase camera

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby GreEn`mArine » Tue Jan 13, 2009 11:45 am

mand1nga wrote:
the configs of Nex SVN needed to bypass csqc check


How did you achieve that? :o


Well, I simply copied the default configs from SVN into the zip archive, that's it. The reason was that when I only placed progs.dat and csprogs.dat into the nex 242 folder I could not start the game, and the error message contained the information that the configs didn't match. That is the reason why I provided them.

mand1nga wrote:Now I'm trying to make the look/mouse movements more smoother. Any ideas or suggestions will be appreciated. Basically what I'm doing right now is applying like a delay for quick movements, but there are many ways to do that.

I'd rather suggest that you start working on a system where the user can define premade camera paths. As you know, I've posted URLs to mods that do that already for UT and Q3, so you can have a look at their functionalities.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby mand1nga » Tue Jan 13, 2009 8:00 pm

It got commited to SVN. Please test it. This is my config:

Code: Select all
bind a +camera_move_left
bind d +camera_move_right
bind s +camera_move_backward
bind w +camera_move_forward

bind MOUSE5 +camera_move_down
bind MOUSE4 +camera_move_up
bind MOUSE1 +camera_roll_left
bind MOUSE2 +camera_roll_right

bind q "set chase_active_free 1";
bind e "set chase_active_free 0";

camera_enable


Enjoy!
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby [-z-] » Tue Jan 13, 2009 8:05 pm

awesome work guys, thanks mand1nga
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby mand1nga » Thu Jan 15, 2009 7:03 pm

Now the camera supports smoother movements on SVN. This is acomplished by maintaining two separated camera states: the current and desired states. For example if you change suddenly the mouse position, this new far position will be the desired state. Then both states will be bridged more smoothly (and slower) as bigger the camera_speed_attenuation cvar is set. This cvar impacts on all methods for controlling the camera: mouse, keyboard and player movements if the camera is on chase mode (camera_free 0).
Also I've added a filter for ignoring small movements with the mouse using camera_mouse_treshold. This helps just a little when you are making a video of a demo.

This is the new complete cvar set:

Code: Select all
set camera_speed_roll 0.9      // Camera rotation speed
set camera_speed_chase 4      // Camera movement speed on the x/y/z axis while chasing the player
set camera_speed_free 8         // Camera movement speed on the x/y/z axis in free mode
set camera_speed_attenuation 30      // Camera movements attenuation factor. Bigger is smoother
set camera_free 0         // Free camera instead of chasing the player
set camera_reset 0         // Reset the camera position
set camera_direction_x 0      // Move the camera on the x axis (relative to the camera angle)
set camera_direction_y 0      // Move the camera on the y axis (relative to the camera angle)
set camera_direction_z 0      // Move the camera on the z axis (relative to the camera rotation)
set camera_mouse_treshold 0.5      // Use to ignore small mouse movements. This allows for smoother camera control
set camera_chase_smoothly 0      // Attenuate player movements (only in chase mode)


You can enable/disable the camera using camera_enable/camera_disable.

Please test it. No need to change the previous config I've posted.

Cheers
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby GreEn`mArine » Fri Jan 16, 2009 12:40 pm

three things
1) maybe I'm wrong but somehow the camera does really only move along the axis, and is not following my direction anymore (e.g. if I aim upwards 45° and press the camera_move_forward key, it stays on my x (or z) axis, and doesn't do any Y movement

2) please provide a setting like camera_fov otherwise you will have weird effects where the fov of you free cam changes because the player was zooming with his nexgun :P

3) when I press move left and move right very fast after another (again and again... like strafing left and right with the camera all the time) the movement of my move_left isn't recognized

Other than that it's great.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby mand1nga » Fri Jan 16, 2009 5:19 pm

1) maybe I'm wrong but somehow the camera does really only move along the axis, and is not following my direction anymore (e.g. if I aim upwards 45° and press the camera_move_forward key, it stays on my x (or z) axis, and doesn't do any Y movement

This is a feature, because this way you can keep going forward in the same altitude while looking upwards. If you want to go up/downwards you can use the +camera_move_up/down aliases. I feel we have more control of the camera this way.

2) please provide a setting like camera_fov otherwise you will have weird effects where the fov of you free cam changes because the player was zooming with his nexgun


Nice one ! Fixed :)

And there is no need for camera_fov, the "fov" cvar works just perfect :)

3) when I press move left and move right very fast after another (again and again... like strafing left and right with the camera all the time) the movement of my move_left isn't recognized


Well it happened to me too a couple of times, it only happens when two (opposite) keys are pressed at the same time, just a really tiny small delay before changing direction should do the trick.

Thank you very much GM

PS: I agree with you in that being able to script the camera is the way to go, I'm already researching about that.
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby GreEn`mArine » Fri Jan 16, 2009 6:59 pm

thanks :o

Still, about the strict movement along the axis ... I dunno, but I feel that an alternative mode would be cool where you are able to fly along the direction you are looking at
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby mand1nga » Tue Jan 20, 2009 8:32 pm

GreEn`mArine wrote:thanks :o

Still, about the strict movement along the axis ... I dunno, but I feel that an alternative mode would be cool where you are able to fly along the direction you are looking at


Try with
Code: Select all
camera_forward_follows 1


Also I've added a camera mode which looks always to the player. Mouse input is disabled on this mode. This is useful if you don't want to be chasing the player with the mouse all over the map. To enable it:
Code: Select all
camera_look_player   1

Cheers
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby GreEn`mArine » Tue Jan 20, 2009 11:25 pm

Very cool, thanks. Will test it very soon!
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby GreEn`mArine » Thu Jan 22, 2009 8:43 pm

Alright, I tested it. Changes look good so far.

However, one thing feels strange to me. When in chase mode and your new feature camera_look_player being enabled, I would expect that my camera rotates around the player when pressing strafe left or strafe right keys. In fact, the camera does so, but at the same time it also moves away from the player, which is a effect I don't expect. Is this a bug?
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

PreviousNext

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron