RE: [Algorithms] Q3 and Collision
Brought to you by:
vexxed72
From: Ignacio C. <i6...@ho...> - 2001-03-06 17:35:55
|
Cem UZUNLAR wrote: > which is true solidness test for walk-able areas? > CONTENTS_SOLID > or > SURF_NONSOLID I just do this: if(!(r_shaderrefs[brush->shaderref].content_flags & mask)) return false; where mask is usually: #define MASK_PLAYERSOLID (CONTENTS_SOLID|CONTENTS_PLAYERCLIP|CONTENTS_BODY) note that for monster, misiles, etc. it may be different. The appropiate definitions are in the public quake3 source code. i recommend you writing a trace function, that returns a trace_t struct that would be something like this: typedef struct { bool allsolid; bool startsolid; float fraction; Vec3 endpos; Plane plane; int surfaceFlags; int contents; } trace_t; there you return the the fraction of the movement, the end position, the plane that you have colided with, and the surface and of the content flags. The surface flags are used for footsteps, and some physic effects. Ignacio Castano cas...@ya... |