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.

Newcomers DBPro Corner / Camera-polygon collision oddity

Author
Message
Orbi
21
Years of Service
User Offline
Joined: 11th Sep 2003
Location:
Posted: 17th Sep 2003 18:21
I've been trying to stop my camera from going through walls but I got a strange thing happening. This is what I got so far:

I got an *.x object (a house) and I set its collision to polygons. I got a dummy object and slapped it over the camera (tried boxes, spheres...). Set the colision for the dummy object and wrote a little bit of code to stop it from going through the .x object. Now here's the strange thing:

The collisions are only detected for my floor and ceiling and not the walls. They're both exactly the same object and the code for up/down has the same test parameters and forward and back. I then made the collision values show on the screen and found that it stays 0 when going through the walls but changes when trying to go through the ceiling or the floor. What am I missing here???


I've found some sneeky ways to alter the object to fake a collision but it ain't the real thing. Anyone got a good reason why the horizontal polygons are used in the collisions and the vertical ones aren't?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Sep 2003 20:03
have you tried using automatic collision? look in the help files for details.

-RUST-
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2003 20:24
A simple test...try swapping the variables around in the colision code, it sometimes works.

Orbi
21
Years of Service
User Offline
Joined: 11th Sep 2003
Location:
Posted: 17th Sep 2003 21:56
The problem is that the collision is never detesced fo the walls but I managed to do something (regardless of how stupid it sounds).

I made the .x file by first making a 3ds and then converting it to X. For that model the walls worked but the floor and ceiling didn't . So now I broke it up into 2 objects. I make the floor and ceiling object as before directly and I make the walls object via a 3ds. So now it all works. From that I'm guessing the problem is in the model data and not in the code (since I didn't change a thing in the code). Something to do with the normals data.... maybe... well isn't this exciting.

Now it's onto sliding collisions, yay fun.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Sep 2003 23:01
yeah, something is "up" with the model.

-RUST-

Login to post a reply

Server time is: 2024-11-25 08:41:04
Your offset time is: 2024-11-25 08:41:04