Hello,
i'm just wondering if someone here knows where to set the actual collision box for the player?
i have move the camera height to 128 (#define DEFAULT_VIEWHEIGHT 128 in bg_public.h) and that works fine, and i have changed the player bounding box by modifying playerMins and playerMaxs in g_client.c. But the player "collision box" is actually the same, 32x32x56 units.
does anyone know where this is done?
(i need to change this to be able to map more correctly to real life units)
thanks,
Player Collision Box
Player Collision Box
Last edited by menorian on Fri Oct 17, 2008 7:48 pm, edited 1 time in total.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Player Collision Box
It is more or less hard coded. If you want to change it, you'll need to dive into lengthy assembler code in the engine.
Re: Player Collision Box
well i manage to find it myself, it's done in: PM_CheckDuck in bg_pmove.c
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Player Collision Box
That's only part of it. To really change the bounding box you also need to patch the collision detection code, most of which lives in qcommon/cm_trace.c. In VQ3 said file consists of bits of C code intermingled with lots of assembler. In ioquake3, the assembler has been rewritten in C for the sake of readability and portability.
Re: Player Collision Box
My project is based on ioQ3 and I was able to do this fairly easily with some code changes to completely centralize the definitions of the player's size. Search for "PLAYER_WIDTH" in my SVN for how I did this (it may still have bugs, so anyone who spots one please tell me).
Project page:
https://sourceforge.net/projects/purityq3
Project page:
https://sourceforge.net/projects/purityq3
-
- Posts: 4
- Joined: Thu Jun 25, 2009 5:06 am
Re: Player Collision Box
is the box used for level collision the same as the one used for hit detection?
what kind of mod are you working on?
what kind of mod are you working on?
Re: Player Collision Box
"is the box used for level collision the same as the one used for hit detection?"
Yes, I believe so. Though it's been a while since I looked at the code.
My project is an abstract shooter. It's on hiatus right now.
Yes, I believe so. Though it's been a while since I looked at the code.
My project is an abstract shooter. It's on hiatus right now.