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.

3 Dimensional Chat / Difficult camera handling

Author
Message
Shogun Blackbrunei
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: Imaginary World
Posted: 9th Feb 2005 18:05
Hmm, I've been trying allmost anything and I just can't get the result I want, here is what I want:
I have an object (object number 2) and a camera (standard camera) now what I want is that the distance between my camera and the model is always the same, however I do want to be able to turn the camera. Basically I have a point (the object) and a camera which turns around that point on a fixed distance.
Does anyone know how to do this? I would appreciate it.
PS: The object is moveable, so the camera will move along with it!

To subdue the enemy without fighting is the highest skill...
Robin
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 9th Feb 2005 20:36
Every loop, position the camera where the object is, rotate it about the x and y axis, and then move it backwards using the move object command with a negative value. Something like the following (Though I haven't tried this out so it might not work )

rem position the camera where object number one is
position camera object position x(1),object position y(1),object position z(1)

rem rotate the camera according to your mouse movements
xrotate camera camera angle x()+mousemovey()
yrotate camera camera angle y()+mousemovex()

rem move the camera back a bit
move camera -100

(I'm assuming your object is number 1, and you can change the -100 to whatever distance you want the camera to be (just keep it negative)) Pop the above at the end of your code, before the sync and fingers crossed it'll work. YOu should be able to control the camera with the mouse

Hope I helped,
Robin

http://www.thegameszone.tk | robin@thegameszone.tk

Don't waste paper. It's not like it grows on trees.
Shogun Blackbrunei
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: Imaginary World
Posted: 9th Feb 2005 23:30
Well I allready tried something alike that, but it keeps moving my camera up
I need my camera to stay still when the mouse isn't moving, this keeps it moving up and up :x

To subdue the enemy without fighting is the highest skill...
Shogun Blackbrunei
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: Imaginary World
Posted: 10th Feb 2005 02:07
I've tried some things with tangens and all that as well, but they all result into unwanted things
Any good coder has a solution?

To subdue the enemy without fighting is the highest skill...
Shogun Blackbrunei
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: Imaginary World
Posted: 11th Feb 2005 22:46
Weeee I found it out myself, wasn't easy though

To subdue the enemy without fighting is the highest skill...

Login to post a reply

Server time is: 2024-11-27 22:39:06
Your offset time is: 2024-11-27 22:39:06