Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Not exactly an animation but related

Aragorn Schism
Registered User
Join date: 1 Nov 2007
Posts: 42
08-26-2008 17:23
I started a project and ended up being stumped and perhaps what I am attempting can not be done. I am going to start with two questions so I understand sl better:

I can activate a standing animation from inventory. My avatar is standing and not changing its position (coordinates). Also my avatar is not rotating in any dimension. This is what I am looking for. If I look around using Alt and the mouse then hit Esc, my avatar will rotate based on the direction I was looking. The directional keys still move my avatar. Is there a way to lock my avatar in position (coordinates and rotation) ?

I have the 1.61 devPose engine which after adjusting a pose ball position will give you the coordinates and rotation of the ball (and I presume the avitar sitting on the ball). The format is as follows:

Position: x.xxxxx, x.xxxxx, x.xxxxx
Rotation: x.xxxxx, x.xxxxx, x.xxxxx, x.xxxxx

I believe the position is the distance along the X Y and Z axis from the center point of the engine, ie. relative to the position of the engine. Why does the rotation have four coordinates? Is the rotation absolute with respect to the axises in sl? Are the numbers the sine of the angle?

Those question having been asked, here is what I am attempting. Without going into the why and where fors, I am attaching (wearing) an engine to my avatar and attempting to freeze my avatar in place by sitting on one of the pose balls. I have taken my 1.61 devPose engine contained in a cube and attached it to my avatar. Now, pose ball positions are defined with reference to the position of the engine. If I rez a pose ball and sit on it the following occurs:

My avatar moves to the position of the pose ball, the cube with engine moves with the avatar, the pose ball now moves to say in position relative to the engine, my avitar then moves to stay with the pose ball....and the cycle continues. It has made for some interesting motions.

Now, I attempted to set the pose ball position to 0.0000, 0.000, 0.0000 so that its position is exactly the same as the position of the engine. Unfortunately, the engine is scripted to not allow this and moves the pose ball to a new position. From a mathematical point of view the solution is straight forward. Attach the engine to my avatar and move it off to one side, then position the pose ball so that its coordinates are exactly the same as the coordinates of my avatar before it sits on the ball. And that worked somewhat when I set the rotation numbers all to 0.00000. I can maintain position facing East. Why I have to face west before I sit on the ball baffles me but it does work. I have attempted to do this facing north, south and west but each time my avatar ends up moving.

Perhaps some one knows the mathematical solution. I am sure there are easier ways to do this but being stubborn and curious, I would like to see it done.
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
08-28-2008 08:47
From: Aragorn Schism
...
I have the 1.61 devPose engine which after adjusting a pose ball position will give you the coordinates and rotation of the ball (and I presume the avitar sitting on the ball). The format is as follows:

Position: x.xxxxx, x.xxxxx, x.xxxxx
Rotation: x.xxxxx, x.xxxxx, x.xxxxx, x.xxxxx

I believe the position is the distance along the X Y and Z axis from the center point of the engine, ie. relative to the position of the engine. Why does the rotation have four coordinates? Is the rotation absolute with respect to the axises in sl? Are the numbers the sine of the angle?
...

Hi, Aragorn

Rotations in SL are not represented in degrees, SL (like most 3D Graphics engines) use Quaternions. This article may help: http://wiki.secondlife.com/wiki/Rotation
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
Bree Giffen
♥♣♦♠ Furrtune Hunter ♠♦♣♥
Join date: 22 Jun 2006
Posts: 2,715
08-28-2008 19:00
Maybe try using a vehicle instead? Or maybe you will have to make a special scripted object that does what you need. I second the suggestion to read the wiki on rotation especially the parts on llGetRot and llSetRot.