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.

Author
Message
DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 24th Apr 2004 08:35
I am making a 3d airplane fighting game and I want to make the camera view rotate on its Z axis. This is what I'm doing.

rotate camera 0,camera angle x(0)+mousemovey(),camera angle y(0)+mousemovex(),camera angle z(0)+mousemovex()

Shouldn't this make the camera rotate to the side whenever the user moves the mouse left or right?

Cookyzue
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 24th Apr 2004 09:03
when you use mousemove to rotate if it gets over 360 it messes up.so you may have to add another command.


NathanF
20
Years of Service
User Offline
Joined: 24th Mar 2004
Location:
Posted: 24th Apr 2004 10:49
rotate camera 0,wrapvalue(camera angle x(0)+mousemovey()),wrapvalue(camera angle y(0)+mousemovex()),wrapvalue(camera angle z(0)+mousemovex())

i think that would work

.........what's the point of reading this?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Apr 2004 12:00 Edited at: 24th Apr 2004 12:02
I think it will also make the camera tilt up when turning right, and down when turning left. You need to leave the camera's z axis alone.

It's all to do with the order things get processed.

BatVink
http://facepaint.me.uk/catalog/default.php AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Apr 2004 12:08
Check out the EZRotate plug-in in the Program Announcements. It will calculate the rotations in the way that you expect.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-11-26 14:31:56
Your offset time is: 2024-11-26 14:31:56