Rotation translation?

Tips and discussions about using OpenSim
Post Reply
User avatar
Allen Partridge
Posts: 70
Joined: Fri Jun 07, 2013 3:46 pm
Location: Oregon, USA
Has thanked: 31 times
Been thanked: 49 times
Contact:

Rotation translation?

Post by Allen Partridge »

I've been working on porting a script which uses rotation dynamically to track motion from an avie in a sim. In LSL this works fine based on the following rotation AXIS expectations.

// AXIS_* constants, represent the unit vector 1 unit on the specified axis.
vector AXIS_UP = <0,0,1>;
vector AXIS_LEFT = <0,1,0>;
vector AXIS_FWD = <1,0,0>;

In Kitely, this fails and gives me a rotation wherein X appears to be the up axis. Is there some mystery to the implementation of rotation vectors in OpenSim that would push my root prim into a different rotation axis? Some special rule? The base prim is a ring - does it start around a different local axis than the SL ring prim?

Open to any thoughts...

--Allen
Check out Virtually Human Builders Guides and Metaverse Ideas Center in Kitely: [url]hop://osgrid.kitely.com:8002/Virtually%20Human/119/31/23[/url] or visit my YouTube Channel to see what's happening in Virtual Worlds [youtube]http://www.youtube.com/virtuallyhuman/[/youtube]
User avatar
Constance Peregrine
Posts: 2349
Joined: Sun Dec 23, 2012 11:35 am
Has thanked: 2778 times
Been thanked: 1482 times

Re: Rotation translation?

Post by Constance Peregrine »

I read of something about this somewhere, but not being a scriptor most of those kinds of things don't get my full attention.

I seem to recall it having to do with the position of the prim...but I may be thinking of something else and be way off base and be showing how truly clueless I truly am.

I feel there is a good answer coming tho-))
Laissez faire et laissez passer, le monde va de lui même!
My little sounds store https://www.kitely.com/market?store=2040306

Ephemeral wanderer...
User avatar
Dundridge Dreadlow
Posts: 616
Joined: Mon May 06, 2013 2:23 pm
Location: England
Has thanked: 590 times
Been thanked: 339 times

Re: Rotation translation?

Post by Dundridge Dreadlow »

Hint: Root prim should be oriented at 0,0,0 before you start messing with it. Any rotation script is a pain in the neck :D
These users thanked the author Dundridge Dreadlow for the post:
Sierra Jakob
ImageImageImageImageImageImage
PS. Kitely is awesome.
User avatar
Allen Partridge
Posts: 70
Joined: Fri Jun 07, 2013 3:46 pm
Location: Oregon, USA
Has thanked: 31 times
Been thanked: 49 times
Contact:

Re: Rotation translation?

Post by Allen Partridge »

Just an update for the archives. I fixed the rotation issue by changing the llCommand - the original script used llSetRot, and I changed it to llRotLookAt. This seems to fix the problem. No clue why it works in LSL but not in Mono - but i'm more pleased by the behavior of llRotLookAt anyway. (And can i just say ... my region is sooooooo fast.) ;) scripts blaze, build never lags, it's very refreshing to build without the bog down of lag.
These users thanked the author Allen Partridge for the post (total 3):
Constance PeregrineIlan TochnerRuby O'Degee
Check out Virtually Human Builders Guides and Metaverse Ideas Center in Kitely: [url]hop://osgrid.kitely.com:8002/Virtually%20Human/119/31/23[/url] or visit my YouTube Channel to see what's happening in Virtual Worlds [youtube]http://www.youtube.com/virtuallyhuman/[/youtube]
Post Reply