Raised This Month: $ Target: $400
 0% 

TraceRays - finding the floor from a position


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 04-04-2009 , 15:16   Re: TraceRays - finding the floor from a position
Reply With Quote #1

Letting the code speak, he means tracing a ray from a player's position down and finding the first intersection with map geometry.

The reason why you need that value is that probably, TR_TraceRayEx takes an angles structure as its direction parameter when used this way,
ie. pitch/yaw/roll (in that order). Pitch is rotation around the Y-axis, yaw around the Z-axis, roll around the X-axis according to Valve's dev wiki (all in degrees). What is being rotated is the normal vector in X-direction ( ie. the vector 1.0 / 0.0 / 0.0 ) (that is the forward output of the AngleVectors function). So what you need is 90 degrees clockwise or counter-clockwise around the Y axis.

Disclaimer: I have never used TR_TraceRayEx so I may be wrong.
__________________
hello, i am pm

Last edited by PM; 04-04-2009 at 15:25.
PM is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode