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 / can someone please help me make a rotating camera?

Author
Message
sorcre
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 3rd Mar 2003 04:42
like when u move ur mouse to the left or right it rotates the camera to go around the guy. like the one in zelda
never achive your goals... cause if you do then what is next????
Plutarck
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: United States
Posted: 3rd Mar 2003 18:04
To help point you in the right direction, read this and it might answer some of your questions: http://www.darkbasic.com/create/bm_tutorials/3dbasics/camera.htm

It's from the new tutorial(s), and it is about controlling the camera.

To wit, one way of doing it (probably not the best), is to use "point", then move the camera; if the point command (method? function? new to the language, so I'll just say "command) is not 'sticky', then you would call point again right after moving the camera.

Then you would just need to decide what input to use to control moving the camera - can't help you there, too new

"My house has a 3D interface. I'm constantly losing crap, running into things, and it's always a mess."
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 4th Mar 2003 00:20
Luckily, I have a piece of code which does just that.



a# is the angle, automatically set to move with the mouse.
x# is the x coordinate of where you want to look.
y# is the y coordinate of where you want to look.
z# is the z coordinate of where you want to look.
r# is the distance away from the object along the floor.
h# is the height above the object.

Here is the same thing but in 3D!



b# is the angle above the point you want to look at, automatically set to the mouse moving upwards.
c# is b#, but including some limits to make sure you can't move the camera too far over or under the object.

Notice this time h# is not needed.

Zelda's camera is slightly more complex, in that it automatically centres behind Link when he is running, and after you wait a while when standing. To do this, you would just set a# to the curveangle of the angle that the player is moving.

Once I was but the learner,
now, I am the Master.

Login to post a reply

Server time is: 2025-08-08 20:40:01
Your offset time is: 2025-08-08 20:40:01