Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Why can't I enter hollow or 3-sided objects?

Author
Message
Troll Fiddler
20
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Mayo, Ireland
Posted: 5th Jun 2005 01:55
(I've just moved this question to it's own thread as I had sort of tagged it onto the end of another discussion and it will probably get lost there as the subject was different).

When I use auto camera collision I can't get into hollow objects. I seem to collide with an invisible boundary where a wall should be and just get sliding collision. I also tried creating an object with only three sides and I can't get into that either. If I turn off collision there is no problem, except of course I go straight through the walls as well.

Turning off global collision and then turning on collision for the individual hollow object doesn't work. It acts as if collision is still off and you (the camera) can just walk through walls still.

Any ideas would be very helpful as I'm stuck at this point. Obviously buildings that you can't go into are not much use.

Thanks very much,

T.
James Morgan
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 5th Jun 2005 02:14
Iv always created my own collision and not used internal ones as felt they were too slow, as of this its possible what im about to say it totally wrong and just plain stupid, but ill give it a shot anyway!!


The internal collision commands may not take into account the actual faces, rather it looks at its position and width, depth + height to create its own boundry, if this is the case then it wont make a difference if you make it hollow.
OR
It could be that you do have a face but pointing the oppisite direction so it doesnt draw to the screen, in other words it looks like a gap in the object for the camera to go through but infact there is something there. One way to check is turn off collision, go inside the object see if you can now see outside the object or if there is a textured face.

Sorry if that doesnt make sense, it may just be worth waiting for someone else to answer....


James

Hello!
Troll Fiddler
20
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Mayo, Ireland
Posted: 5th Jun 2005 02:20
Yer, not sure how the internal commands work. But there is definitely no face in the models I've tried. And yes I can see out through the gap when inside.

So I'm still a bit stumped, unless as you say it just blocks you from going anywhere within the floor space of an object. But that would seem to make auto collision totally useless unless you never went inside a building/room/tunnel etc. It's all very strange!

Thanks,

T.
James Morgan
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 5th Jun 2005 02:23
It seems stupid but makes sense, as you have set object collision to boxes, polygons and spheres. If it was pixel perfect you wouldnt need to specify the collision type...

Hello!
Troll Fiddler
20
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Mayo, Ireland
Posted: 5th Jun 2005 02:36
In that sense I guess so. But it means that it's treating the imported directx object as one big block instead of individual walls and so on. As it is modelled as separate walls and so on in the modeller, treating it as one homogenous block seems mighty peculiar. I'm sure you're on the right track though, as I've tried so many combinations of models and collision settings that there aren't many other explanations left.

But in that case, how do you make buildings that you can get inside?

T.
James Morgan
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 5th Jun 2005 04:47
You can use your own collision, if you search the forums for collision you will soon find code that uses the intersect object command that can produce very accurate collision results.
Failing that, load up all the walls separately but thats a major pain!
Hopefully someone else can advise you of another way or explaination.

Hello!
Mr Bigger
20
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 5th Jun 2005 05:05
Have you seen the sliding collision thread by Gman in the code snippets section?I think you could adapt that to your needs with
little effort.
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 5th Jun 2005 11:01
you need to change the collision type to polygons for the object, at the default it careates a bug collision cuboid around the whole object instead of using the faces.
something like
set object colision to polygons obj_num

http://www.larinar.tk
AMD athlon 64 3000+, 512mb ddr400, abit kv8, 160gb hdd, gigabit lan, ati radeon 9800se 128mb.
Troll Fiddler
20
Years of Service
User Offline
Joined: 19th Jan 2005
Location: Mayo, Ireland
Posted: 5th Jun 2005 20:34 Edited at: 5th Jun 2005 20:36
mm0ozct gets a place on my wall of fame Thanks very much. I had tried setting the collision to boxes thinking they might stick to the walls but it didn't work.Then I used "show bounding box" to look at the result and got a bewildering aray of lines sticking out all over the place. So I assumed (idiot that I am) that none of the other types would work either, and that I was misunderstanding the purpose of the collision command.

It's a nasty sight to see a huge troll jumping round waving his underpants in the air in glee. Thanks again to all those who helped here.

T.
that dude
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: USA
Posted: 6th Jun 2005 21:20
yeah, i hate it when my troll does that.

http://www.nuclearglory.com/?u=fearik = sweet as hell collision system. easy on that leather thing in your back pocket too.
the left side of my head isn't bigger, the right side is just smaller

Login to post a reply

Server time is: 2025-05-31 00:01:32
Your offset time is: 2025-05-31 00:01:32