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 Professional Discussion / how do i lock th camera to the varying heights of an object>?

Author
Message
Stevie
User Banned
Posted: 19th Sep 2004 10:13
I have made a landscape utilising the terrain commands, but as u can only use one detail texture - i decided to make a beach area textured with sand - which is saved as an x file. I have added this to the terrain - and it blends well. My question is this - at the moment i have the camera locked to the terrain - so it follows it - but when i get to the sand object i need the camera to unlock from the terrain and in affect lock to the surface of the sand object - rather than the camera going through it. I have the NG plugin too.

Is there anyway of doing this - so the camera will in affect stay on top and follow the different heights of the object?
Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Sep 2004 10:58
If you have the NGC plugin it is very easy. Set your sand object to have sliding collision with your camera object. Then only set your object to the terrains height if it is below the terrain.

I can post a complete example if needed.

Stevie
User Banned
Posted: 19th Sep 2004 11:02
Thanks for the above - as my sand object is bumpy in parts - would sliding colision make the camera move over the alterations in height over the object - and hence not make the camera go through it?
Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Sep 2004 11:08
Yes with sliding collision it will make your object move up and down along the sands surface (as long as you have some type of gravity) and not go through it.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Sep 2004 17:49
If you're using my gravity code I sent you Steve [ ] then you don't even need to 'unlock' the camera from the terrain. Simply the act of walking over the sand will activated NG to keep the camera there.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Stevie
User Banned
Posted: 20th Sep 2004 12:07
Ok - so i have NG collision working - and my beach feature has been placed. I have a system going - so that when the player presses the movement keys and then depresses them, rather than coming to a complete halt, he just glides for a secoond or so and then stops. Sometimes the glide effect seems to linger for some reason - and the player continuous gliding very very slowly - and this is fine when he is on the beach feature. NG stops the player going through the beach which i want. However when the player comes to a complete halt on the beach feature - NG seems to completely lock the player to the object and therefore he cannt move... I have used sliding collision - anyone got any clues??

Login to post a reply

Server time is: 2025-05-29 10:36:28
Your offset time is: 2025-05-29 10:36:28