Re: [hlcoders] Traces

2006-08-10 Thread Aaron Schiff
--
[ Picked text/plain from multipart/alternative ]
It's not a matter of speed that's the question...it's a matter of
functionality...
If you need to see when a volume hits a solid, use tracehull. If you care
about the corners and not the middle, use traces.

--
ts2do
--

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



Re: [hlcoders] Traces

2006-08-10 Thread Jeffrey \botman\ Broome

John Sheu wrote:

Just a question: what's faster, a TraceHull or, say, 7 plain traces?


1 TraceHull is faster than 7 line traces (assuming they trace from the
same start and end points.

--
Jeffrey botman Broome

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



[hlcoders] Traces

2006-08-09 Thread John Sheu
Just a question: what's faster, a TraceHull or, say, 7 plain traces?

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



Re: [hlcoders] Traces

2006-06-15 Thread Teddy

You can get the vector position of the point of collision in a
trace_t, it's tracename.endpos

On 6/15/06, John Sheu [EMAIL PROTECTED] wrote:

Are there any model traces that give the actual point of collision,
instead of just the 0.0f-1.0f value in a trace_t?
IPhysicsCollision::TraceCollide() seems like a good candidate, but not
quite, as it doesn't give me the point of intersection.

___
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] Traces

2006-06-15 Thread Jay Stelly
 Are there any model traces that give the actual point of
 collision, instead of just the 0.0f-1.0f value in a trace_t?
 IPhysicsCollision::TraceCollide() seems like a good
 candidate, but not quite, as it doesn't give me the point of
 intersection.

If you're talking about a ray trace, then the point of collision is
trace.endpos.  If you're talking about a swept collide or bbox, then
there isn't necessarily a single point of contact.  You can have face
vs. edge and face vs. face contacts.  So really it's a point, line
segment, or polygon of contact.

You can get a vertex that is nearest the plane of contact by taking the
support map of the swept object in the opposite direction of the contact
normal (trace.plane.normal).  For a bbox, the support map is the corner
of the box that has the same component-wise signs as the normal.  For a
collide, you can call physcollide-CollideGetExtent().

so something like:

Vector contactPoint = physcollide-CollideGetExtent(
pSweptPhysics-GetCollide(), trace.endpos, pSweptEntity-GetAbsAngles(),
-trace.plane.normal );

would work for swept collides and

// mins, maxs are the bbox passed to TraceRay()
Vector contactPoint = trace.endpos;
contactPoint.x += ( trace.plane.normal.x  0 ) ? mins.x : maxs.x; //
note  0 because we want the -normal
contactPoint.y += ( trace.plane.normal.y  0 ) ? mins.y : maxs.y;
contactPoint.z += ( trace.plane.normal.z  0 ) ? mins.z : maxs.z;

for a bbox.  But remember, this will give you a vertex on the box even
when it's a face of the box in contact with the other object (even if
some sub-section of the face that doesn't include the vertex is the only
contact).

Also in case you can use this, if you have physics objects that are
actually in contact (i.e. not just traces), you can use
CreateFrictionSnapshot() to get a list of contacts and those can return
a point actually on the contact manifold.

Jay

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



[hlcoders] Traces

2006-06-14 Thread John Sheu
Are there any model traces that give the actual point of collision,
instead of just the 0.0f-1.0f value in a trace_t?
IPhysicsCollision::TraceCollide() seems like a good candidate, but not
quite, as it doesn't give me the point of intersection.

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



Re: [hlcoders] Traces

2006-06-14 Thread Aaron Schiff
--
[ Picked text/plain from multipart/alternative ]
Why not just multiply the trace ray (end-start) by the fraction and add it
to the start?

--
ts2do
--

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