Inside3D!
     

Much Help Needed

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Fri Apr 01, 2005 2:50 am    Post subject: Much Help Needed Reply with quote

Hi ppl, I'm working on a mod for the Return To Castle Wolfenstein game and I really need some help/advise. I imported a new game character into the game that is considerably taller then the standard players and I need to raise the camera(?) view that a player is using when they are that new character to the new height. I've been combing over the source code but I can't find anything but a few references to DEFAULT_VIEWHEIGHT. Since RTCW is so simular to Q3 maybe someone can point me in the right direction or file and I'll hopefully take it from there?
Many Thanks!!!
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Fri Apr 01, 2005 4:46 am    Post subject: Reply with quote

This is a Quake 1 site....

but maybe find the definition of DEFAULT_VIEWHEIGHT (which I imagine is 22), add a TALL_VIEWHEIGHT or something with a bigger number, and go through all references of DEFAULT_VIEWHEIGHT in the code, using TALL_VIEWHEIGHT instead if you're the tall person? (Up to you how to figure out when you're the tall person though... )
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Fri Apr 01, 2005 2:35 pm    Post subject: Reply with quote

Are you sure you need to change the camera and not the player size instead?
Back to top
View user's profile Send private message Visit poster's website
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Fri Apr 01, 2005 6:56 pm    Post subject: Reply with quote

Sajt wrote:
This is a Quake 1 site....


True, but since RTCW is a stepchild of Q3 I thought I'd give it a try. Laughing
Plus you good folks here understand the code and talk about it!

Sajt wrote:

but maybe find the definition of DEFAULT_VIEWHEIGHT (which I imagine is 22), add a TALL_VIEWHEIGHT or something with a bigger number, and go through all references of DEFAULT_VIEWHEIGHT in the code, using TALL_VIEWHEIGHT instead if you're the tall person? (Up to you how to figure out when you're the tall person though... )


I'll try that.. thanks, Sajt. Very Happy
Back to top
View user's profile Send private message
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Fri Apr 01, 2005 7:11 pm    Post subject: Reply with quote

Spike wrote:
Are you sure you need to change the camera and not the player size instead?


Hi Spike, I got the new model into the game but it's about twice the height of the average player..(which is what I want)
So when you're that new player you should be looking down on the other players, instead of eye-to-eye like it is now.
I went into third-person-view and used debug_bullets to check out some things and the bounding box, camera, and bullets are still looking the same as if it was still one of the regular soldiers.
I'm not a coder or scripter but I've been reading the source file for about 2 weeks now and its starting to make 'some' sense to me.
I made a few small changes to test my ability, compiled it, and it does work. Shocked
But here's a question to confirm my newness to coding...
Is the Bounding Box and Hit Box the same thing?
Back to top
View user's profile Send private message
Supa



Joined: 26 Oct 2004
Posts: 122

PostPosted: Fri Apr 01, 2005 11:14 pm    Post subject: Reply with quote

I'm not very knowledgeable in Q3 gamecode, but I'm pretty sure the bounding box is for collisions against the world and the hitboxes are for collisions against traces.
Back to top
View user's profile Send private message Send e-mail
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Fri Apr 01, 2005 11:55 pm    Post subject: Reply with quote

Ooh, I didn't know RTCW had hitboxes!

Raelyn, you're also going to want to increase the bbox size. If anywhere it says something like this in the Q3 code: (I haven't seen the Q3/RTCW code really so I don't even know if they use the same Vector macros as Quake did)

VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 32);

Use this instead for the tall guy
VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 72);


Or maybe they have it like this
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};

Whatever it looks like, just take the 32 and change it to a bigger number
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Sat Apr 02, 2005 2:08 am    Post subject: Reply with quote

Supa wrote:
I'm not very knowledgeable in Q3 gamecode, but I'm pretty sure the bounding box is for collisions against the world and the hitboxes are for collisions against traces.


Ahhhh.. you must be right. I made a character run against a wall in DevMode to test this and sure enough the box I'm seeing is just touching the wall.
The hit box must be tighter against the character or I would be able to score hits alot better then I do. Wink
Thanks for answering that, Supa!
Back to top
View user's profile Send private message
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Sat Apr 02, 2005 2:20 am    Post subject: Reply with quote

Sajt wrote:
Ooh, I didn't know RTCW had hitboxes!

Raelyn, you're also going to want to increase the bbox size. If anywhere it says something like this in the Q3 code: (I haven't seen the Q3/RTCW code really so I don't even know if they use the same Vector macros as Quake did)

VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 32);

Use this instead for the tall guy
VectorSet(mins, -16, -16, -24);
VectorSet(maxs, 16, 16, 72);


Or maybe they have it like this
vec3_t mins = {-16, -16, -24};
vec3_t maxs = {16, 16, 32};

Whatever it looks like, just take the 32 and change it to a bigger number


Very Happy Very Happy I know where this is! They use the vec3_t mins description.
I'll try this out now. Many Many thanks, Sajt!
I'll let you guys know how it works out.
Back to top
View user's profile Send private message
Raelyn



Joined: 01 Apr 2005
Posts: 6

PostPosted: Sat Apr 02, 2005 4:08 pm    Post subject: Reply with quote

Success!! Very Happy

I found the vec3_t player mins for the BBox and made it bigger. Then tested it and discovered that the BoundingBox is also the HitBox. Confused
Then found the #define VIEWHEIGHT and changed it and it worked perfectly. Thanks again, guys! I feel my headache letting up already Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group