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 / Rotation of the Y axis on a tilt -- help!

Author
Message
ViviD
23
Years of Service
User Offline
Joined: 21st Apr 2003
Location:
Posted: 21st Apr 2003 22:28
alright, heres the deal. im trying to get an object to yrotate on a slope. i have calculated the angle of the slope and that works fine, but i need to be able to turn the object. i try writing the code like this (in the main do/loop code)
if leftkey()=1 then yrotate object 1, wrapvalue(yAng#-4)

that should only rotate on the y axis correct? well, all it does is move a little bit, then go back to what it was. yAng# is equal to Object angle y(1)...can you help me to get this dang thing to rotate? if i take out my code for calculating the ange of the matrix at that point, it works fine...i dunno...thanks in advance.

cheers, vivid
bitJericho
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 22nd Apr 2003 07:54
you're not updating yAng with yAng - 4(yang = yang-4), instead your rotating yrotate yangle - 4 just that one time, and not storing the new answer...u prolly won't understand from my crappy explanation...you should be able to see what I changed to make it work properly..if ya don't, don't be afraid to ask..



The 3D Modeler's Group : http://groups.yahoo.com/group/3dModeler/
The Unofficial DB Newsgroup : http://groups.yahoo.com/group/DBMag/
Leade
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 22nd Apr 2003 17:00
You have to change the way the rotation is done:

I think the command is "Set Rotation ZYX", or something similar.
look throug the help and it should show you.

Leade.

Login to post a reply

Server time is: 2026-06-11 17:31:22
Your offset time is: 2026-06-11 17:31:22