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.

Newcomers DBPro Corner / Camera following a box around a corner??

Author
Message
cypher
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 6th May 2003 05:13
In the example below, how do I get a camera to follow the player in a way the when the player goes around a corner, the camera should "whip" around the corner so that it never loses sight of the player??


___P___
|
|C
|

Of course the obvious answer is to have the cam right on the player, but that takes all the fun out of a Third Person Perspective Game.

I already have a "follow" cam with all the trimmings, but I am stumped on this one part.

Any help would be greatly appreciated.

thanks all!
cypher
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 6th May 2003 19:52
the example above should have looked like this...sorry for the oops!

____p__
######|
######|
######|C
######|

Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 6th May 2003 22:20 Edited at: 6th May 2003 22:24
You could make some kind of "hotspot" at the corner, that if the player touches it, the camera automatically moves in and rotates to look at the player. For example, you could make a cube, hide it, and when the player touches it it starts a subroutine calling the camera over and rotating it.

____¦P¦
######|
######|^
######|C
######|

if collision(playerObject,cornerObject)=1 then gosub call_Camera

call_Camera:
position camera camNumber,cornerX#,cornerY#,cornerZ#
point camera camNumber,playerX#,playerY#,playerZ#
return

add: Also, it wouldnt be all that hard to make sure the camera doesnt change to that position every moment the player touches the object, set a flag value that tells you from what side you are coming, and put multiple "corner boxes" for each corner.

Whatever I did I didn't do it!
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 7th May 2003 00:25
check=object visible ( player)
if check = 0 then "move camera to player"

haven't tested it, it may not work , if the visibility is intended as what is within the screen frame no matter if it is behind something , instead of reporting only what is being drawn
cypher
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 7th May 2003 03:00
thanx guys!

I'll apply your ideas when I get off work tonight. If/When I get it figured out I will post here the results for others to use.

tx again

Login to post a reply

Server time is: 2024-11-24 13:25:49
Your offset time is: 2024-11-24 13:25:49