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 / Position camera rotation at 90 degrees?

Author
Message
roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 10th Mar 2006 05:35
I'm playing around with yet another regurgitation of Pong, and I have encountered a bothersome behavior. I have my camera positioned in space at a slight angle looking down at my 3d paddles and ball. When I move the camera directly above the action (90 degrees above the center of the field so the paddles appear to move up and down and the ball moves left and right) and use "point camera 0,0,0" the camera attitude rotates 90 degrees so that the paddles move left and right and the ball moves up and down. I'm assuming this happens because the relevant attitude information is lost when the camera moves to this position, but I don't know how to correct it. Any ideas?

'Just one game,' they said, and started to play. That was yesterday.

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Mar 2006 08:56
XROTATE CAMERA, YROTATE CAMERA, ZROTATE CAMERA. That should do it.

roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 10th Mar 2006 15:37
Actually, I've tried using all three of those commands to rotate the camera 90 degrees and 180 degrees (just to see if I could make any change) without success. I also tried "rotate camera" hoping that by specifying the value of each rotation I could get somewhere. Still nothing. Is there something wrong with my code?



'Just one game,' they said, and started to play. That was yesterday.

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 10th Mar 2006 15:49
Nevermind, I'm silly. There's nothing stopping me from repositioning the bats to accomodate the camera.

'Just one game,' they said, and started to play. That was yesterday.

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 10th Mar 2006 18:23
Just for anyone else out there having this problem, I actually found the solution without moving the paddles in my example. I just used "roll camera right 90" to fix the problem.

Thanks for your help, BatVink!

'Just one game,' they said, and started to play. That was yesterday.

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 10th Mar 2006 18:28
You could just use
O.o

FunkyStickmen: Battle of the Races (1%)
roswell
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United States
Posted: 10th Mar 2006 21:20 Edited at: 10th Mar 2006 21:42
BatVink mentioned the same thing, but unfortunately it didn't work. Neither did "rotate camera 90,0,0". I also verified that it wasn't the Y or the Z value by trying yrotate camera and zrotate camera. None had any effect. "roll camera right 90" worked like a charm, though.

<edit>
Oops! My mistake. It looks like "yrotate camera 90" does work. I must have mistyped something originally. "yrotate camera" would make more sense anyway, because the view tilted left and right would be controlled by this axis.

Thanks for your help, Everyone!

In addition, the reason "roll camera right" worked is because in the manual it states that "roll camera right" is a command that operates independent of any axis orientation. So regardless of which axis was relevant, the camera would be tilted to the right 90 degrees.

'Just one game,' they said, and started to play. That was yesterday.

Dual Athlon 2.0/1GB RAM/GeForce Ti4200-128/Win2000 Pro

Login to post a reply

Server time is: 2024-09-24 17:32:43
Your offset time is: 2024-09-24 17:32:43