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 Discussion / @TDK (dont feel offended others, you can still help)

Author
Message
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 11th Oct 2005 23:15
TDK, you showed me this camera thing when I asked before.
http://forum.thegamecreators.com/?m=forum_view&t=59911&b=10

Now My concern is I have collision for my object, and now I need it for the camera. With your camera code, how could I make it so the camera doesn't go through an object, like the distance of the camera shortens when the camera is colliding against an object that the player isn't...
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 11th Oct 2005 23:40
Sorry if you feel like I'm using you for code, but I've already tried, and no success...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Oct 2005 03:04
If you are using Set Camera To Follow, then the last parameter is a flag to switch collision detection on or off. Just turn it on.

If you are using camera control that doesn't use Set Camera To Follow, then place the camera in an invisible box and make a bounding collision box for it. You can then detect when the collision box (the camera) collides with something and move it out of the way.

TDK_Man

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 13th Oct 2005 01:15
My man, thats my problem! I cant get the box thing right! here is the code you showed me:



(The 'contobj' thing is not the problem)

How would I have it so like, when you walk backwards into something you cant see inside of it?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Oct 2005 04:55
You need something along these lines:



Probably won't run exactly as typed as it was from memory, but it should point you in the right direction.

TDK_Man

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 13th Oct 2005 23:23
LOL, Tdk...

The problem is moving the camera out of the way!!

I sould be more specific next time

Login to post a reply

Server time is: 2025-05-22 12:41:37
Your offset time is: 2025-05-22 12:41:37