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
3D MODEL COLLISION DETECTION PROBLEM
Moderator: Graf Zahl
- Azure Agony
- Posts: 71
- Joined: Fri Aug 24, 2007 6:40
- Location: Somewhere in HANGAR or E4M7
3D MODEL COLLISION DETECTION PROBLEM
- Attachments
-
- COLLISION PROBLEM.jpg (50.07 KiB) Viewed 1066 times
-
- TEST_BOX.zip
- (92.24 KiB) Downloaded 74 times
- InsanityBringer
- Posts: 137
- Joined: Fri Jun 15, 2007 22:59
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
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.

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.

- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Azure Agony
- Posts: 71
- Joined: Fri Aug 24, 2007 6:40
- Location: Somewhere in HANGAR or E4M7
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?
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?
Last edited by Azure Agony on Fri Jan 04, 2008 19:12, edited 1 time in total.
- Azure Agony
- Posts: 71
- Joined: Fri Aug 24, 2007 6:40
- Location: Somewhere in HANGAR or E4M7
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!


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!
Last edited by Azure Agony on Thu Jan 03, 2008 22:29, edited 1 time in total.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Azure Agony
- Posts: 71
- Joined: Fri Aug 24, 2007 6:40
- Location: Somewhere in HANGAR or E4M7
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!!!

Last edited by Azure Agony on Thu Jan 03, 2008 22:38, edited 1 time in total.
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
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. 



- Azure Agony
- Posts: 71
- Joined: Fri Aug 24, 2007 6:40
- Location: Somewhere in HANGAR or E4M7
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!!


