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
Bish
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Cyberspace
Posted: 13th Dec 2002 18:56
I am making a 3d space game and I am having a bit of a problem with this source code.

if you press up/down key to make the x angle of the camera go over or under a 90 degree angle and then turn the camera with the right/left keys it will either roll the camera or turn it in the opposit direction. How can i stop this from hapening.
please help
UberTuba
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 13th Dec 2002 22:00
ok. curvangle changes cy or cx by the amount turny or turnx(or by slightly more or slightly less because of momentum).
Lets work out a series of theoretical to show your problem.

xturn = xturn + 2, so xturn = 2
xangle = xangle + xturn, so xangle = 2

xturn = xturn + 1, so xturn = 4
xangle = xangle + xturn, so xangle = 6


xturn = xturn + 1, so xturn = 6
xangle = xangle + xturn, so xangle = 12

2,6,12,24, your numbers are going up faster than they should. insstead of turnx# = turnx# + 2, put turnx# = 2, and then at the end of the loop ,just before the sync put turnx# = 0 so your camera does not continuue turning after the key has been pushed

Life is a terminal disease.
You never survive it.
Bish
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Cyberspace
Posted: 14th Dec 2002 11:21
Thanz but That did not help. your idea only made the camera move 2 i dont whant it just to move 2 it needs to beable to move 360 degrees.
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 14th Dec 2002 13:01
Im not sure if I understand exactly what you are trying to do, but I think I might know what you are talking about. If so, I think it works fine on my version of DB(1.13)

Cause I tried the code, and it rotates 360 degrees on both x and y. Even though I was going over a 90 degree angle(both ways), then trying the opposite rotation.

Bish
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Cyberspace
Posted: 14th Dec 2002 13:31
ok thx ill try that
Bish
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: Cyberspace
Posted: 14th Dec 2002 23:16
i does not work
Element
21
Years of Service
User Offline
Joined: 14th Dec 2002
Location: United States
Posted: 23rd Dec 2002 02:06
I dont know what it could be then....It shouldnt be your graphics card either..cause it shouldnt effect camera angles...although that could be possible, its highly unlikely, unless you have a really really(im talkin' old school) outdated graphics card....

"Skateboard 'til the wheels come off"

Login to post a reply

Server time is: 2024-02-24 23:05:37
Your offset time is: 2024-02-24 23:05:37