Crouching position problem
by Daniel Neilsen · in Torque Game Engine · 10/30/2002 (4:57 am) · 19 replies
Hi Guys,
Having a small problem at the moment. I have added a crouch button to my game and, currently using the landing animation, this works reasonably well.
The first problem is that the camera does not move in when in the crouched position. I tried to look into the jump animation but could not see where the camera was adjusted when jumping. Does anyone know how to do this or where I should look?
The next issue I am not sure is a problem yet but I am betting it is going to be is the collission box. Does anyone know if it will deform when in the crouched position or will this have to be coded in?
Any help would be appreciated guys :)
Having a small problem at the moment. I have added a crouch button to my game and, currently using the landing animation, this works reasonably well.
The first problem is that the camera does not move in when in the crouched position. I tried to look into the jump animation but could not see where the camera was adjusted when jumping. Does anyone know how to do this or where I should look?
The next issue I am not sure is a problem yet but I am betting it is going to be is the collission box. Does anyone know if it will deform when in the crouched position or will this have to be coded in?
Any help would be appreciated guys :)
About the author
#2
Hope this helps,
- Melv.
10/30/2002 (5:18 am)
Thou shalt find it in a console variable and it's name will be known as thus "GameBase::boundingBox" and it shall come to pass that it was a vertibal BOOL!Hope this helps,
- Melv.
#3
10/30/2002 (1:19 pm)
Thanks guys but I know how to display a bounding box. I need to know how to adjust the camera.
#4
Maybe a little change to the code could change between two different bounding boxes... dunnoo....
about the other thing... i thing the camera should move with the player's head if you jump or crouch... it's a node attached to it afterall..
10/30/2002 (1:57 pm)
The bounding box won't deform, daniel. It's set to a fix size from the code, not even from the model.Maybe a little change to the code could change between two different bounding boxes... dunnoo....
about the other thing... i thing the camera should move with the player's head if you jump or crouch... it's a node attached to it afterall..
#5
Deforming the bounding box in the crouched position will not be that difficult I wouldnt think.
The camera does not transform automatically unfortunately. At this point, I have no idea why.
Anyone have any idea why this would be so? You will notice that if the landing animation plays in game, the camera is not effected also....
10/30/2002 (2:09 pm)
Thats what I thoughtDeforming the bounding box in the crouched position will not be that difficult I wouldnt think.
The camera does not transform automatically unfortunately. At this point, I have no idea why.
Anyone have any idea why this would be so? You will notice that if the landing animation plays in game, the camera is not effected also....
#6
10/31/2002 (8:28 am)
are you using renderfirstperson = true; ?
#7
10/31/2002 (12:13 pm)
yes, that is still true
#9
I am wondering if the animation itself actually specifys the moving of the eye point ?
ie. the jump animation does but the land does not?
Anyone know?
10/31/2002 (4:44 pm)
YesI am wondering if the animation itself actually specifys the moving of the eye point ?
ie. the jump animation does but the land does not?
Anyone know?
#10
10/31/2002 (5:22 pm)
In theory the eye node is a child of the head mesh, so when animating they move along... but maybe the land sequence doesnt have information from transforming the eye node? Maybe you could try by making a new crouch animation...
#11
hehehe
Ill ask my modeller to see if he can see something odd there :)
10/31/2002 (9:13 pm)
/me is greatly afraid of modelling programshehehe
Ill ask my modeller to see if he can see something odd there :)
#12
11/10/2002 (7:45 pm)
My intuition suggests that when they created the "land" animation, they did not include camera movement because they didnt want your head bobbing around crazily in game. You, on the other hand, want this. I would probably check out the modeling aspect of this.
#13
useObjEye = true;
That seemed to add a bounce and do the correct camera transforms correctly, even while running it has a bob to it that is visually seen.
11/10/2002 (11:16 pm)
Try adding this to the datablock of the playeruseObjEye = true;
That seemed to add a bounce and do the correct camera transforms correctly, even while running it has a bob to it that is visually seen.
#14
11/10/2002 (11:43 pm)
actualy Sam is on the right track, there is code in there that "pins" the spine and prevents the camera from matching every little movement from the eye node if it is animated to follow the head. It can be removed from the player.cc if you look hard enough, I don't remember where I read this but it was on the forum somewhere.
#15
11/11/2002 (1:35 am)
Did you just copy the run stuff and change it to crouch?
#16
Do you have any more details on this?
I tried adding
useObjEye = true;
to the player data block in script and nothign happened.
I also tried adding useEyePoint = true; but once again, nothing happened.
I did a full search of the engine for useObjEye and didnt find anything either. Do you have any idea where you came across this?
11/11/2002 (4:48 am)
Hi Sam,Do you have any more details on this?
I tried adding
useObjEye = true;
to the player data block in script and nothign happened.
I also tried adding useEyePoint = true; but once again, nothing happened.
I did a full search of the engine for useObjEye and didnt find anything either. Do you have any idea where you came across this?
#17
11/11/2002 (6:15 am)
Now that they mention it, it's true, I read on a thread somewhere something about the camera ignoring the spine and head transformations while in first person view. It was something done in the T2 days cause they didn't like the camera moving around like crazy... now where did I read that...
#18
11/12/2002 (2:08 am)
Sorry Daniel it is "useEyePoint" but it only seems to work if I have mounted another player...Pervs!
#19
At least it now gives me some code to copy ;)
(I cant program...I just copy and paste LOL)
11/12/2002 (3:23 am)
Nah thats kewl Sam,At least it now gives me some code to copy ;)
(I cant program...I just copy and paste LOL)
Torque Owner Sabrecyd
comment out this line and just it's ending bracket in shapebase.cc around line 2299 in an unmodified file
if (!mShapeInstance || gShowBoundingBox) {then recompile. It will show all the bounding boxes in the game.I'm pretty sure the player bounding box stays the size set in player.cs though.