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 / Camera Collision?

Author
Message
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 14th Nov 2008 20:45
So I took a look at dbAutomaticCameraCollision but it doesn't seem to work, I still go through my floor which is made of a plane. Can someone explain this?

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 )
"
MES
16
Years of Service
User Offline
Joined: 9th Feb 2008
Location: AFK
Posted: 16th Nov 2008 21:13
Hello,
You have to turn on the collision of your floor.
I'm using this an it works:


You also have other possibilities to turn on collision.
From DarkSDKBasic3D.h


http://www.Computer-Masters.de
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 18th Nov 2008 21:53
I have a problem with this code.



I can only move one step in each direction and then it moves back to the original position. You can move freely without this code. I thought this was because it was colliding with something at the camera spawn position but the camera is miles away from any objects. Any ideas?
CheatCat
17
Years of Service
User Offline
Joined: 7th Mar 2007
Location: Sweden
Posted: 19th Nov 2008 12:38
A camera is not an object, try to remove this line:

dbSetObjectCollisionOn(0);

But it worked for me anyway... :S
The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 20th Nov 2008 11:20
didn't worked for me, i`m using sparky for collision. anyone know a way to do camera collision using sparky ?

Login to post a reply

Server time is: 2024-09-30 11:42:44
Your offset time is: 2024-09-30 11:42:44