Re: [hlcoders] Player Leaning

2005-05-18 Thread Kuja
Michael Kramer wrote:
I am trying to do player leaning...I have gotten everything except the
command...I am using ViewPunch(); for right now but it doesn't
stay...Does anyone know if there is a way I can rotate the FOV or make
it so that ViewPunch can stay? Thanx :D
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Simply rolling the view won't exactly be leaning, it'd be more like
tilting your head. To do leaning properly, you need to offset the view
and rotate it ;)
-Kuja
Digital Paintball
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


Re: [hlcoders] Player Leaning

2005-05-18 Thread Michael Kramer
Would I use the ViewOffset() funtion? I found that out just barely
using the SnapEyeAngles(); Function (I think it is that function) and
it just turns the camera.

On 5/18/05, Kuja [EMAIL PROTECTED] wrote:
 Michael Kramer wrote:

 I am trying to do player leaning...I have gotten everything except the
 command...I am using ViewPunch(); for right now but it doesn't
 stay...Does anyone know if there is a way I can rotate the FOV or make
 it so that ViewPunch can stay? Thanx :D
 
 ___
 To unsubscribe, edit your list preferences, or view the list archives, 
 please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 
 
 Simply rolling the view won't exactly be leaning, it'd be more like
 tilting your head. To do leaning properly, you need to offset the view
 and rotate it ;)
 -Kuja
  Digital Paintball

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Player Leaning

2005-05-18 Thread r00t 3:16
I have player leaning working (it isn't perfect needs some tweaking but it
works)
You need to transition the player to the left / right Using the player
angles and the ViewOffset
The angle will roll the camera a little and the view will shift the camera
to the left or right a little. Also you need to drop it down a little also.
if you lean over your hieght drops a tad.
Once the transition is done, You have to keep updating the viewoffset so
when the player spins he will always be leaning to the same direction. If
you do not do this , if you are standing still he will lean left but if you
turn right or left we will be leaning forward or backwards depending on the
way you turn. So you have to keep updating the veiwoffset.
What I did was once the transition is done figure out what the maximum lean
would and then just keep setting that
// Would fully peek them transition time has expired lean em over.
Vector vOffset, vTrueOffset,vRight;
player-EyeVectors(NULL, vRight, NULL); // consume memory much ?
vTrueOffset = vRight * -20; // This is the full left peek -20 units.
vOffset = player-GetViewOffset();
vOffset.x = clamp(vTrueOffset.x, -20, 20); // clamp it just incase
vOffset.y = clamp(vTrueOffset.y, -20, 20); // clamp it just in case
player-SetViewOffset(vOffset);
CategorizePosition();
// this is in the transition period...
Vector vRight, vLeft, vUp;
vUp = player-GetViewOffset();
player-EyeVectors(NULL, vRight, NULL ); // get the vRight vector x,y
vLeft = vRight * -2.50;
// below is kind of cheesy but I was figuring out a way to do it all at once
player-m_Local.m_vecPunchAngle.Set( ROLL, -flPeekMilliseconds * 0.025 ); //
this will roll the camera 0.025 for the transition period
player-SetViewOffset(vLeft);

That is a snip of code of how I did it. Yea it might not be pretty but this
was back when the MP SDK first came out.
I haven't had a chance to implement peaking and prone in the hl2mp sdk as of
yet..
For help on the transition stuff look at the Duck() function in
gamemovement.cpp
Hope that helps.

r00t 3:16
CQC Gaming
www.cqc-gaming.com
- Original Message -
From: Michael Kramer [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Wednesday, May 18, 2005 8:14 PM
Subject: Re: [hlcoders] Player Leaning

Would I use the ViewOffset() funtion? I found that out just barely
using the SnapEyeAngles(); Function (I think it is that function) and
it just turns the camera.
On 5/18/05, Kuja [EMAIL PROTECTED] wrote:
Michael Kramer wrote:
I am trying to do player leaning...I have gotten everything except the
command...I am using ViewPunch(); for right now but it doesn't
stay...Does anyone know if there is a way I can rotate the FOV or make
it so that ViewPunch can stay? Thanx :D

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Simply rolling the view won't exactly be leaning, it'd be more like
tilting your head. To do leaning properly, you need to offset the view
and rotate it ;)
-Kuja
 Digital Paintball
___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


[hlcoders] Player Leaning

2005-05-17 Thread Michael Kramer
I am trying to do player leaning...I have gotten everything except the
command...I am using ViewPunch(); for right now but it doesn't
stay...Does anyone know if there is a way I can rotate the FOV or make
it so that ViewPunch can stay? Thanx :D

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Player Leaning

2005-05-17 Thread Jeffrey \botman\ Broome
Michael Kramer wrote:
I am trying to do player leaning...I have gotten everything except the
command...I am using ViewPunch(); for right now but it doesn't
stay...Does anyone know if there is a way I can rotate the FOV or make
it so that ViewPunch can stay? Thanx :D
Are you just trying to roll the view?  If so, see
CBasePlayer::CalcViewRoll()
--
Jeffrey botman Broome
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


Re: [hlcoders] Player Leaning

2005-05-17 Thread Adam \amckern\ Mckern
or read the ot, that jay posted

setang -45 0 0
setang 45 0 0

Trust me on this, that those angels are uttley wrong
(i have never gotten p r y)

Adam

--- Jeffrey \botman\ Broome
[EMAIL PROTECTED] wrote:
 Michael Kramer wrote:
  I am trying to do player leaning...I have gotten
 everything except the
  command...I am using ViewPunch(); for right now
 but it doesn't
  stay...Does anyone know if there is a way I can
 rotate the FOV or make
  it so that ViewPunch can stay? Thanx :D

 Are you just trying to roll the view?  If so, see
 CBasePlayer::CalcViewRoll()

 --
 Jeffrey botman Broome

 ___
 To unsubscribe, edit your list preferences, or view
 the list archives, please visit:

http://list.valvesoftware.com/mailman/listinfo/hlcoders



http://ammahls.com




Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders