top down camera
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
top down camera
I am working on a gauntlet style mod. i can make the camera look down, but mouse look breaks that. if i disable mouselook, i still can't get aim to work. he just shoots at the ground. is there a way to fix the aim to just shoot straight ahead? i use normalize((self.origin+v_forward*500) - self.origin) but that makes him shoot however the mouse is aiming. how do i get him to just shoot from the origin+view_ofs to a point say 100 units straight ahead?
- hondobondo
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
m_pitch 0
Evil, I know, but it stops mouselook from doing anything in pretty much all engines.
Clear out self.v_angle_x on the server before doing makevectors. This will set their angles as pure yaw (and a bit of roll, but that doesn't affect forwards), meaning that forward really is forward, even if their client ignored the m_pitch thing, and will always be properly normalised too.
The alternative is to 'tweek' the v_forward vector and set v_forward_z=0, but that's ugly, and breaks in certain clients/settings. And it needs normalising as well.
Clearing out their pitch is the more correct way to do it.
normalize((self.origin+v_forward*500) - self.origin)
is more simply written as:
v_forward
just so you know. :)
So yeah...
self.v_angle_x = 0;
makevectors(self.v_angle);
source = self.origin + self.view_ofs;
target = source + v_forward*500;
you prolly want a traceline here
impact would then be at trace_endpos but then you knew that already. mneh
Evil, I know, but it stops mouselook from doing anything in pretty much all engines.
Clear out self.v_angle_x on the server before doing makevectors. This will set their angles as pure yaw (and a bit of roll, but that doesn't affect forwards), meaning that forward really is forward, even if their client ignored the m_pitch thing, and will always be properly normalised too.
The alternative is to 'tweek' the v_forward vector and set v_forward_z=0, but that's ugly, and breaks in certain clients/settings. And it needs normalising as well.
Clearing out their pitch is the more correct way to do it.
normalize((self.origin+v_forward*500) - self.origin)
is more simply written as:
v_forward
just so you know. :)
So yeah...
self.v_angle_x = 0;
makevectors(self.v_angle);
source = self.origin + self.view_ofs;
target = source + v_forward*500;
you prolly want a traceline here
impact would then be at trace_endpos but then you knew that already. mneh
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
thanks spike
Spike wrote:m_pitch 0
Evil, I know, but it stops mouselook from doing anything in pretty much all engines.
Clear out self.v_angle_x on the server before doing makevectors. This will set their angles as pure yaw (and a bit of roll, but that doesn't affect forwards), meaning that forward really is forward, even if their client ignored the m_pitch thing, and will always be properly normalised too.
The alternative is to 'tweek' the v_forward vector and set v_forward_z=0, but that's ugly, and breaks in certain clients/settings. And it needs normalising as well.
Clearing out their pitch is the more correct way to do it.
normalize((self.origin+v_forward*500) - self.origin)
is more simply written as:
v_forward
just so you know.
So yeah...
self.v_angle_x = 0;
makevectors(self.v_angle);
source = self.origin + self.view_ofs;
target = source + v_forward*500;
you prolly want a traceline here
impact would then be at trace_endpos but then you knew that already. mneh
that works. now for the fun stuff. i can probably have a working beta with monsters and a map or two by monday
- hondobondo
- Posts: 207
- Joined: Tue Sep 26, 2006 2:48 am
Yup, but don't even think about setting it's value through QC unless you're doing something like this that has a specific requirement, OK?

We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
