Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Y axis = why what hrm

Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
08-01-2003 17:25
Via the object editor:

I have an object at 0,0,0 axis.

I type 178 into the Y axis input box.

The result is the object now moves to:
180x,2y,180z.
Wtf it rotated 2 degrees on the Y axis and wtheck it's moving the x and z and hrm weeeeee insanity is the result. :p

Other values give oddball results as well (typically anything >= 90, | <=-90) along the y axis.

Bug, feature, confuser? Sure makes scripting Y Axis rotations *fun*! :p

How about dropping the entire Rot, and use simplified 360 degree system, and YOUR end can figure out player inputs (object edit AND sciript wise). I just want to rotate the y axis 178degress -- not flip the x and z and move the y 2 deg instead of 178, which is still 176 degrees OFF target anyway:P

gah
Boso
Driftwood Nomad
Registered User
Join date: 10 May 2003
Posts: 451
08-01-2003 18:15
Bos, I have noticed this behavior as well. It is frustrating. I end up manually rotating an object until it's close to where I want it then tweaking the numbers. No idea why this weirdness occurs.

I agree that a simplified 360 degrees system would be beneficial to builders and scripters. Ok, so quaternions for rotation are supposedly better, but what the hell is a quaternion, and why is it better? And let's get some consistency in units of measure, so the rotation values in the edit box match those in the llRot calls and no weird ass conversion math is necessary.

Maybe I'm just stupid and I'm missing something, but rotations seem to be very difficult in SL. Doesn't need to be.
_____________________
Driftwood Nomad
D&D Dogs Co-founder

"Second Life’s first AI companion animal"
The Second Opinion, 08/05/2003

D&D Dogs HQ Pawaii (127, 63)
Mainland Store Kuula (214, 124)

http://www.sldogs.com

SL Dogs Zazzle store!
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
08-01-2003 23:42
Rotations are definitely a chore, for the mathematically impared (myself included). But not terrible with llRot2Euler and llEuler2Rot functions.. but still it is quite confusing.

I spent another hour or so trying to figure out why my Y axis rotations are going wild. Never figured it out and I logged out again from brain burn (doesn't take long on my small brain!) :)

Still, it would be nice to see some simplfied functions for basic rotations in scripting. Perhaps more so for non-phys, but also for phys objects (or perhaps I've just overlooked an already existing function).

Bos

p.s. I apologize for my previous post's mutterings, was a bit miffed at the time.
Jake Cellardoor
CHM builder
Join date: 27 Mar 2003
Posts: 528
08-02-2003 01:43
Driftwood, you never need to deal with a quaternion if you don't want to; as Bosozoku says, llEuler2Rot and llRot2Euler will let you specify everything as rotations around the three axes. And multiplying by DEG_TO_RAD and RAD_TO_DEG isn't that hard, but you could certainly write helper functions that do the Euler and radian conversions for you. For example:

CODE

mySetRot( vector eul )
{
eul *= DEG_TO_RAD;
llSetRot( llEuler2Rot( eul ) );
}

vector myGetRot()
{
vector eul = llRot2Euler( llGetRot() );
eul *= RAD_TO_DEG;
return eul;
}


As for the Y-axis weirdness in the object editor, I agree that it's confusion. I imagine the problem is that a given orientation can be specified in more than one way in Euler format, and the system is probably converting to a quaternion and then converting back to Euler. Seems like it should be possible to avoid the Y-axis weirdness, though.
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
08-02-2003 16:36
I should point out that it didn't rotate 178 degrees -- per my input. The object moved 2 degrees, and flopped the x/z 180. The Y axis went to 2, not 178 as I input (definitely a bug).

I'm having a lot of problems with rotations in a script, and with the apparent problems with Y axis in the editor I'm wondering if the script is encountering those as well.

For example, I move the x and z axis, but keep y at 0, yet I always get changes in the y position (it's the allusive s axis no doubt, which I don't very well comprehend). Anywho I'll keep trying to figure it out, but there defintely appears to be bugs in (y-axis) rotation, at least in the editor.

Boso
Nergal Fallingbridge
meep.
Join date: 26 Jun 2003
Posts: 677
08-02-2003 17:00
Last night I was having horrid problems trying to get the various hollowed and sliced cyclinders that made up a spiral behave >_<

they all seemed to move 1 degree or more on their own -- I get one lined up, go on to work on the next section, go back and go, "AUUUGH, WTHECK?"

Finally wound up locking them down as I went and threatening them with a severe beating via flipflop if they dared budge.

It was similar to the problems you were having, Boso. :P
_____________________
powered by caffeine since 1998!

"In such ugly times, the only true protest is beauty."
-- Phil Ochs
Shadow Weaver
Ancient
Join date: 13 Jan 2003
Posts: 2,808
08-05-2003 07:15
Possible soultion...there are two y axis...the first and primary one is the one everyone sees when they initialy start The World Y Axis. The second one is the "Local Object" Y axis. You may have typed in 178 but on the local axis it may have only been two degrees on the world axis.

Look on your edit tab while the edit button is selected the list that is written under the create Icon or right side of the edit function shows the select box for local axis.

just to understand it better take a prim any prim rotate it manually then go and select local axis. you will see that your axis will change line up from th world to the individual part. Also the numbers will reflect this difference.

Sincerely, ShadowWeaver.
_____________________
Everyone here is an adult. This ain't DisneyLand, and Mickey Mouse isn't going to swat you with a stick if you say "holy crapola."<Pathfinder Linden>

New Worlds new Adventures
Formerly known as Jade Wolf my business name has now changed to Dragon Shadow.

Im me in world for Locations of my apparrel

Online Authorized Trademark Licensed Apparel
http://www.cafepress.com/slvisions
OR Visit The Website @
www.slvisions.com
Ingie Bach
Registered User
Join date: 17 Dec 2002
Posts: 254
08-05-2003 10:00
From: someone
Originally posted by Nergal Fallingbridge
Last night I was having horrid problems trying to get the various hollowed and sliced cyclinders that made up a spiral behave >_<

they all seemed to move 1 degree or more on their own -- I get one lined up, go on to work on the next section, go back and go, "AUUUGH, WTHECK?"

Finally wound up locking them down as I went and threatening them with a severe beating via flipflop if they dared budge.

It was similar to the problems you were having, Boso. :P


I've had this same problem, in fact I think my house in Rose is off by .5 degrees. I sure hope I hid it well enough :p now that I've admitted it , he hee hee.

I don't know what in the world happened, but when I put a 1 meter long wall down, then "pull" out a copy to attach to the end of the first, when I line them up, they're off. Rotation is set at 0 degrees in all directions, but this still happens. So I think it is a bug.

Ingie
_____________________
I love modeling in Blender, if you want to check out a fantastic package for modeling and game developement (great for Architectural Walkthroughs), go to my site: http://www.ingiebee.com