Forum

BaseQC CCam rotation?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Postby Blackstar1000 » Mon Aug 29, 2011 4:44 pm

This is a wonderful piece of code once again. I messed with it all night and morning.

Currently I'm trying to set the "self.angles" in the camera script to be the same as the player when the code is enabled.

In other words. I spawn, then move around. Type in the impulse and the player will snap to another angle.

I simply want the impulse to find the players current angle, and "snap" to his current angle. Thus not moving.
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Blackstar1000
 
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Postby ceriux » Mon Aug 29, 2011 8:23 pm

so you want a normal chase cam? i suggest you just delete what ever you have, and look through enders scratch tutorial the normal chasecam that this one is built off of is in that tutorial.

or just delete it and stuffcmd chase_active 1.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Blackstar1000 » Fri Sep 02, 2011 11:35 pm

Actually I wanted to thank you again. I realized what I was trying to ask for was very hard to describe. So I toughed it out and modified the code above for a couple days. The result was exactly what I was looking for.


I'm working on a third person game, I have pretty exactly recreated the camera that is used in the game MASS EFFECT. It's kick ass, thanks again guys.
Knives out. Catch the mouse. Squash his head. Put him in your mouth.
Blackstar1000
 
Posts: 52
Joined: Mon Sep 13, 2010 5:16 pm

Re: BaseQC CCam rotation?

Postby mrmmaclean » Fri Sep 09, 2011 3:12 am

Nice work. I did a Mass Effect style camera once when I was dabbling. A lot of freedom comes when you use the player/client as a camera rather than a player, and use a basically "dumb" monster as the player character/avatar instead. Bind some impulse keys to make the avatar move, have the "camera" update its position based on the avatar's position and its angle based on mouse movement in pre-think, and bam, you have a Mass Effect view! You can even have the avatar's AI control it when the "cam" is not focused on it, like when switching among multiple characters, etc., but that's a whole different can of worms.

Sorry I don't have the code anymore nor did I notice this thread until now otherwise I would have tried to be of some help... :oops:
User avatar
mrmmaclean
 
Posts: 33
Joined: Sun Aug 22, 2010 2:49 am

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest