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.

Dark GDK / Collision with Mesh Bounding Boxes

Author
Message
Sand Shark 9
16
Years of Service
User Offline
Joined: 21st Jan 2008
Location:
Posted: 21st Jan 2008 08:10
I cannot get camera collisions to work with actual objects - they keep colliding with the bounding boxes as opposed to the actual mesh. This is my code:

////////////////////////////////////////////////////////////



Does anyone know how I can "remove" the bounding box from the object so the camera (and I assume other objects) will collide with the mesh itself?

Thanks,
SandShark

-What Signature?
skull driveshaft
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location:
Posted: 21st Jan 2008 11:15
read the documentation that came with the GDK install.

you could use a dbSetObjectCollisionToPolygons (ID);

you will notice that the functionalities are very basic for anything other than a Sphere.

have a look at my Fake Physics post to get an understanding of what is happening.

the hardest part is knowing what type of collision detection to use in combination with which collision logic, you do have to make your own for the objects.

this is what you missed from reading:

Quote: "dbAutomaticCameraCollision
This command will set the specified camera to automatic collision. Automatic collision takes over the task of adjusting the camera when it hits an object in the 3D scene. Cameras with automatic collision use a collision sphere of the specified radius. If the Response value is set to one, the new position backtracks to the last collision free position when a hit occurs.

Syntax
void dbAutomaticCameraCollision ( int iObject, float fRadius, int iResponse ) "


why doesn't it work the way I want it to!

Login to post a reply

Server time is: 2024-09-29 09:29:00
Your offset time is: 2024-09-29 09:29:00