Page 1 of 1
3D MODEL COLLISION DETECTION PROBLEM
Posted: Thu Jan 03, 2008 21:46
by Azure Agony
Hi! I got problem with 3D model collision detection. I build for example a box 16*16*16 pixels, and when I shoot it bullets don't hit properly box but something like rectangle.
Here is Decorate
actor TEST 20001
{
//Game Doom
Radius 8
Height 16
HEALTH -1
+SOLID
+SHOOTABLE
+NOGRAVITY
+NOBLOOD
States
{
Spawn:
SOUL A -1
Stop
}
}
and Modeldef
Model TEST
{
Path "models"
Model 0 "TEST_BOX.md3"
Skin 0 "202.png"
Scale 1 1 1
FrameIndex SOUL A 0 0
}
Have you guys some ideas or I made something wrong. I got this problem with all my 3d models. Great thanks for all help!
And here I show how is look like and here you can download testing map with box, I added shotgun, get'em and try shoot box and you'll see the bullets don't correctly hit. Unpack folder TEST_BOX to your GZDoom directory and just run GZDoom with command line -file collision.zip collision_map.wad -warp 01
Posted: Thu Jan 03, 2008 22:01
by InsanityBringer
Hmm, I managed to shoot the box just fine. Just to make sure, I gave the box some health and a death state and managed to "kill" it.
Posted: Thu Jan 03, 2008 22:05
by Enjay
I'm not really sure what the nature of the problem you are describing is. Are you saying that the area below the box with no decals on it has blocked the shotgun shots as if the actor was bigger than you have defined it? If so, I am not getting this problem at all.
Any shots aimed directly at the box resulted in a bullet puff on the box. Anywhere wide of the box, or above/below it resulted in a decal on the wall.
Regardless, it is unlikely to be caused by the model. As far as I know, models are not processed at all for collision detection and you should get the same effect even without the model being present, just the sprite based actor.
My initial thought was the problem might be caused by the "actors infinitely tall" compat option, but that did not affect how I could put decals on the wall with a weapon. So, I'm stumped ATM.

Posted: Thu Jan 03, 2008 22:11
by Graf Zahl
Seems to work ok for me.
Posted: Thu Jan 03, 2008 22:21
by Azure Agony
Yes here is the problem, space below of box is blocked by sprite (but why, it got only 16*16 pixels)
Yes I know the 3D model doesn't have real collision detection but only use sprite properieties. I show that I made 3D model of box 16*16*16 pixels and I made in decorate states:
actor TEST 20001
{
//Game Doom
Radius 8 //If my 3d model is a cube with 16 pixels long wall radius is half of wall long, isn't true?
Height 16 //If my 3d model is a cube with 16 pixels long wall so the sprite properietes Height should be 16, isn't it?
(...)
Maybe I'm wrong? That's why I'm asking

Did you change some of these states I see you shooted box correctly?
Posted: Thu Jan 03, 2008 22:25
by Azure Agony
Oh man

I can make a movie when I shoot that box, and it doesn't work properly, I can't find the reason of that problem, I'm using 1.0.27 version cause 1.0.29 doesn't detect reload labels correctly, (I posted that long ago

)
Hmm, I don't know what is wrong with it. I see you says is everything ok. Hmm, I fight with this problem since month. Meanwhile, thanks for quick replies guys!
Posted: Thu Jan 03, 2008 22:27
by Graf Zahl
There you got your problem.
Posted: Thu Jan 03, 2008 22:35
by Azure Agony
Oh, yes the problem was in version of GZdoom, huh, great thanks! I installed 1.0.29 and that problem vanished. Now I can back to my models, I know now that I did them correctly

(But I have to stay for now in older version, cause only there run properly my weapon mod with custom reload labels). THANKS!!!
Posted: Thu Jan 03, 2008 22:37
by Enjay
Just for completeness because I tried this whilst people were posting, here's the actor with the model removed. The sprite is sitting too high - but that's how it is in doom2.wad and it's nothing to do with how the actor is defined. In fact, it helps show off the 16x16 square of no decals quite nicely.

Posted: Thu Jan 03, 2008 22:48
by Azure Agony
I found that problem when I was working on 3D models of hanging lamps. Everything was fine for first look, I shooted it and lamp crash down, sparks and glass came out of it, but one day I shooted the door 60 pixels below and my lamp crashed down. I said, damn what was that? And I discovered this problem

I was changing sprites properities, model positioning, and others

And today I decide to to write a post

Once again: THANKS!!