FAQ  •  Register  •  Login

custom chasecam tutorial

Moderator: Inside3D Admins

<<

ceriux

User avatar

Posts: 1852

Joined: Sat Sep 06, 2008 3:30 pm

Location: Florida, USA

Post Mon Jan 24, 2011 8:45 am

how would i set up bakers rpg cam positions with out effecting, chase_active 1?
QuakeDB - if you have any cool quake video's please feel free to upload them on my moddb group!
<<

Baker

User avatar

Posts: 3170

Joined: Tue Mar 14, 2006 5:15 am

Post Mon Jan 24, 2011 11:38 am

ceriux wrote:how would i set up bakers rpg cam positions with out effecting, chase_active 1?


One of a great many ways ...

One example:

Make a "chase_active 2" that uses hardcoded values or different cvars than chase_active uses.

But perhaps a better question, why is this a goal?

Let me explain: if you are intending to switch the camera type via cvar then why not switch them all at the time of the camera type switch? I'm just saying that if you are going to switch the chase_active value then it isn't much more work to switch the other few values too [assuming you are working in the framework of this tutorial where chase_active 2 sets an alternate camera type].
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

ceriux

User avatar

Posts: 1852

Joined: Sat Sep 06, 2008 3:30 pm

Location: Florida, USA

Post Mon Jan 24, 2011 8:32 pm

well, honestly the camera tutorial is just for me to learn a little bit. my best way to learn is ask how to do something and do it so i can see the difference in between each way of doing something.
QuakeDB - if you have any cool quake video's please feel free to upload them on my moddb group!
<<

Chrispy

Posts: 15

Joined: Fri Feb 25, 2011 3:39 am

Post Sat Feb 26, 2011 5:45 am

Good tutorial!

I found when I did this, the third person model would be present... which made things a bit ugly. This was my fix (let me know if it's wrong or whatever):

In r_main.c, head to "void R_DrawViewModel" and below this:

  Code:
currententity = &cl.viewent;
if (!currententity->model)
return;


And add:

  Code:
if((int)chase_active.value != 0)
return;


So if chase_active is NOT 0, then don't draw the gun model.
<<

Baker

User avatar

Posts: 3170

Joined: Tue Mar 14, 2006 5:15 am

Post Sat Feb 26, 2011 8:42 am

Chrispy wrote:Good tutorial!

I found when I did this, the third person model would be present... which made things a bit ugly. This was my fix (let me know if it's wrong or whatever):

In r_main.c, head to "void R_DrawViewModel"


Yep. A WinQuake source release bug. :D A bug not present in the GLQuake engine source.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Chrispy

Posts: 15

Joined: Fri Feb 25, 2011 3:39 am

Post Sat Feb 26, 2011 7:50 pm

Should I use GLQuake instead?

(Well, I actually can't run GLQuake because it crashes... I suppose because it's not meant for Windows? :P)
<<

frag.machine

User avatar

Posts: 1468

Joined: Sat Nov 25, 2006 1:49 pm

Post Sun Feb 27, 2011 12:11 am

TBH I didn't bother to test the tutorial in WinQuake, so if it's not working as expected, I must apologize for that.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
<<

Baker

User avatar

Posts: 3170

Joined: Tue Mar 14, 2006 5:15 am

Post Sat Feb 18, 2012 6:19 am

Re: custom chasecam tutorial

Thoughts on possible future modifications of this type based on other games ...

1) Perhaps have a figurative diamond shaped bounding box or maybe a circle and only move the camera when these bounds are crossed. This would allow for greater viewing area in front of the player when walking in a specific direction. This would require previous chase_active coordinates to be stored and to be aware of things like teleportations. Since I guess this would be useful for up/down as well and since introducing 2D into 3D would be bad. Maybe cvars to define a tolerance and stick with a sphere for simplicity purposes (simple radius). If the player's origin exceeds the current bounds of the sphere, relocate the sphere and refresh the camera position.

2) Perhaps the option to not try to clip move the camera from a wall and use a calculation for each brush or object that is between the player and the view origin and apply alpha.

Yes, certainly not new ideas but occasionally I think of the overhead view style of play.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Previous

Return to Programming Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft