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 / How can i turn collision on?

Author
Message
MES
16
Years of Service
User Offline
Joined: 9th Feb 2008
Location: AFK
Posted: 24th Mar 2008 12:58
Hi,
I spwant some DirectX Objects (*.x-files) in a heightmap like this:



How can i turn on collision; the problem is, I can walk through the wall. Is there a better code to spawn Objects?

And: Is there any physics? I want some objects (e.g. boxes) i can move in the game and they must fall on the ground.

kind regards

MES
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Mar 2008 13:40
1: Use either the built in collision system (yuck) or Sparky's Collision. some googling would do you justice.

2: Either Buy the already DarkGDK Integrated DarkPhysics (has a Ageia Physics Backend) or implement Ageia yourself - or Newton, or ODE or any of the other physics engines that are out there.

Easiest route for Collisions - Sparky's - free - fast - simple.

Easiest Route for Collision + Physics - Probably DarkPhysics as it has it all.

mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 24th Mar 2008 16:45
ok.
first set this command under camera decleraiton like this
dbPositionCamera( 0,x,y,z);
dbAutomaticCameraCollision( 0 , 10 , 0 );

and make object collision On.

dbSetObjectCollisionOn ( 3 );

then u cant walk through the wall.
thanks...
Chris_W
16
Years of Service
User Offline
Joined: 27th Mar 2008
Location:
Posted: 27th Mar 2008 17:39
I have picked up on this thread as possibly giving me a clue for the following.

I have downloaded and tested the 3dw world loader for GDK. This functions as expected but I would like to turn on collisions to avoid the camaera going throught the walls. Taking the approach described above I assume (perhaps naively) that in order to make the collisions work for the camera I need to do something like the following:

[// Let us try setting all the objects to collision on

for (int j = 0; j<TotalObjs; j++)
{
dbSetObjectCollisionOn(j);
}
dbAutomaticCameraCollision(1, 10, 0);
]

This does not work so I presume I am being too naive. Any hints greatly appreciated.
Chris_W
16
Years of Service
User Offline
Joined: 27th Mar 2008
Location:
Posted: 28th Mar 2008 10:56
OK, I solved it. The solution is the following:

Login to post a reply

Server time is: 2024-11-20 05:32:32
Your offset time is: 2024-11-20 05:32:32