Hitbox Crashing
by Westy · in Torque Game Engine · 11/11/2003 (11:14 am) · 33 replies
I am having a huge problem with hitboxes from this resource:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3981
This does actually work, but it crashes the game quite quickly.
i was wondering if anybody else has tried this resource and got it to work ok? Details of the problem are on the resource page.
Any help would be very appreciated!
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3981
This does actually work, but it crashes the game quite quickly.
i was wondering if anybody else has tried this resource and got it to work ok? Details of the problem are on the resource page.
Any help would be very appreciated!
About the author
#22
Can you explain what this did ?
I tried a new backward pattern like this
U32 temp4[10] = {9,8,7,6,5,4,3,2,1,0}
It worked to but im not shure if i need it or not !?
-Billy :):):)
11/18/2003 (12:52 pm)
Wow kyle you are the man , Its not crashing !Can you explain what this did ?
I tried a new backward pattern like this
U32 temp4[10] = {9,8,7,6,5,4,3,2,1,0}
It worked to but im not shure if i need it or not !?
-Billy :):):)
#23
is in order spine,head,r uarm,l uarm,r farm,l farm,r thigh, l thigh,r calf,l calf.
then
CheckPattern[3][k] = temp4[k];
well..
sidehit was set to 1 of four values.
0-back
1-right
2-left
3-front
then CheckPattern[sidehit] was used, but CheckPattern[3] didint exists, cos only had 3 locations (0,1,2).
Thats why we adding another for front.
11/18/2003 (2:23 pm)
U32 temp4[10] = {0,1,3,2,5,4,7,6,9,8};is in order spine,head,r uarm,l uarm,r farm,l farm,r thigh, l thigh,r calf,l calf.
then
CheckPattern[3][k] = temp4[k];
well..
sidehit was set to 1 of four values.
0-back
1-right
2-left
3-front
then CheckPattern[sidehit] was used, but CheckPattern[3] didint exists, cos only had 3 locations (0,1,2).
Thats why we adding another for front.
#24
*havnt tested in a while, then when testing on mp and shooting any client it crashes straight away (DEBUGGER points to consol emethod argument)..
This worked perfectly before.
Has anyone tried this with HEAD recently?
01/23/2004 (8:22 pm)
Hmm seems as though this code aint working anymore.. or i made i chnage i cannot see..*havnt tested in a while, then when testing on mp and shooting any client it crashes straight away (DEBUGGER points to consol emethod argument)..
This worked perfectly before.
Has anyone tried this with HEAD recently?
#25
But this sounds like the error we got before with
the checkpattern .
If i have anytime i test it in the head.
-Billy
01/24/2004 (5:10 am)
I have this working but i dont use the latest headBut this sounds like the error we got before with
the checkpattern .
If i have anytime i test it in the head.
-Billy
#26
And i can run around fine, it only occurs when a projectile hits a hitbox..
01/24/2004 (7:30 am)
No this is a different problem slightly..And i can run around fine, it only occurs when a projectile hits a hitbox..
#27
Its should still work on HEAD.
01/24/2004 (3:07 pm)
Ah found prob, it was just a mistake on my part.. sorry.Its should still work on HEAD.
#28
C:\torqueNew\torqueHB\engine\game\player.cc(1281) : error C2065: 'getNodeTransform' : undeclared identifier
C:\torqueNew\torqueHB\engine\game\player.cc(2169) : error C2065: 'transTime' : undeclared identifier
C:\torqueNew\torqueHB\engine\game\player.cc(4131) : error C2039: 'getNodeTransform' : is not a member of 'Player'
c:\torquenew\torquehb\engine\game\player.h(251) : see declaration of 'Player'
I have tryed to add the function "getNodeTransform" to the shapebase from the other tutorial, but with no luck. Any help?
02/17/2004 (1:27 pm)
I am trying to compile this resource on the latest HEAD but I get these errors:C:\torqueNew\torqueHB\engine\game\player.cc(1281) : error C2065: 'getNodeTransform' : undeclared identifier
C:\torqueNew\torqueHB\engine\game\player.cc(2169) : error C2065: 'transTime' : undeclared identifier
C:\torqueNew\torqueHB\engine\game\player.cc(4131) : error C2039: 'getNodeTransform' : is not a member of 'Player'
c:\torquenew\torquehb\engine\game\player.h(251) : see declaration of 'Player'
I have tryed to add the function "getNodeTransform" to the shapebase from the other tutorial, but with no luck. Any help?
#29
02/17/2004 (2:19 pm)
You need to add the declaration in player.h too.
#30
You have been lots of help so far.
02/18/2004 (4:09 am)
Thanx dude, I final got everything to compile with no errors, I turned hitbox rendering on so I can see the box's, I added the script bit for the projectile on the crossbow but it seems that the cross bow bolts just go straight through the players and do not pickup the collision, any help?You have been lots of help so far.
#31
Its currently setup to collide with them and it wont work with default AI players, i.e kork.
02/18/2004 (7:35 am)
Did you try it with other clients in multiplayer?Its currently setup to collide with them and it wont work with default AI players, i.e kork.
#32
I can't seem to find a way to update the aiPlayers hitboxes everytime they are animated, the black boxes and the green boxes never align and the black boxes seem to just stay as a bunch next to the model... Has anyone tryed to get this working with the aiPlayer?
If you want to see what it looks like then turn on the box rendering and look at the aiPlayer in the starter.fps, he should be named Kork.
02/18/2004 (9:00 am)
I just tested it with another client and the hitbox collision works, I just need to get it to work with the aiPlayer object.I can't seem to find a way to update the aiPlayers hitboxes everytime they are animated, the black boxes and the green boxes never align and the black boxes seem to just stay as a bunch next to the model... Has anyone tryed to get this working with the aiPlayer?
If you want to see what it looks like then turn on the box rendering and look at the aiPlayer in the starter.fps, he should be named Kork.
#33
I changed a line on player.cc and the black hit boxes move as the red boxes do then...
In the function "void Player::updateAnimation(F32 dt)"
Look for:
"if (getControllingClient()){"
Change to:
"if (getControllingClient())|| mActionAnimation.animateOnServer) {"
This seemed to do the trick and now the aiPlayer class has working hitboxes, thanks again to Yui Chung!
02/20/2004 (3:01 am)
Hey guys, after taking a while with trial and error I decided to see what problems the guys came up with on the other resource, thanks to Yui Chung the aiPlayer problem can be fixed, this is what he wrote:I changed a line on player.cc and the black hit boxes move as the red boxes do then...
In the function "void Player::updateAnimation(F32 dt)"
Look for:
"if (getControllingClient()){"
Change to:
"if (getControllingClient())|| mActionAnimation.animateOnServer) {"
This seemed to do the trick and now the aiPlayer class has working hitboxes, thanks again to Yui Chung!
Associate Matt Fairfax
Night Heron Games