The rotating script I have.. But the perfect measurement are not my strong part in life..
Pls some????
Its not for spam or ridiculous ads/banners in SL
DDDDThese forums are CLOSED. Please visit the new forums HERE
X Y Z measurement to get a box standing on one of the corners |
|
|
PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
|
12-11-2005 07:24
I need help with the X Y Z measurement to get a box standing on one of the corners... and then rotating perfect around it own axis....
The rotating script I have.. But the perfect measurement are not my strong part in life.. Pls some???? Its not for spam or ridiculous ads/banners in SL DDDD |
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
12-11-2005 07:46
this should rotate a cube to its exact (or close) corner:
vector eul = <0,45,45>; //45 degrees around the z-axis, in Euler form And llTargetOmeaga(llEuler2Rot(<0,0,45> * DEG_TO_RAD, PI/5, 1); should set it spinning on the world Z-axis but it has been so long since I messed with this and have not tested this.eul *= DEG_TO_RAD; //convert to radians rotation quat = llEuler2Rot(eul); //convert to quaternion llSetRot(quat); //rotate the object _____________________
|
|
PetGirl Bergman
Fellow Creature:-)
Join date: 16 Feb 2005
Posts: 2,414
|
12-11-2005 08:05
TKS! - I did a fast tryout....
Its dancing around some.. Hm this isnt easy... Amy other suggestions??? |
|
Lewis Nerd
Nerd by name and nature!
Join date: 9 Oct 2005
Posts: 3,431
|
12-11-2005 10:32
Amy other suggestions??? I just tried something simple that worked. I created a block, and rotated it on a 45 degree X and 45 degree Y axis in Edit, and changed the texture one side to be sure to see what was happening. Then I put in the following simple script (a freebie one I got) default { state_entry() { llTargetOmega(<0,0,1>,PI,1.0); } } And that seemed to do what you're asking if I understand you correctly. If you change the third value of <0,0,1> it changes the speed of the rotation, if you need to.... I found 0.1 to be adequate for my needs. Presumably messing with the figures in the <0,0,1> will make it rotate other axes. Give it a try.... it may be what you were looking for. Be interesting to know if it did. Lewis _____________________
Second Life Stratics - your new premier resource for all things Second Life. Free to join, sign up today!
Pocket Protector Projects - Rosieri 90,234,84 - building and landscaping services |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
12-11-2005 11:19
If you can spare an extra prim, and easy solution is just to use an invisible prim as an engine. Set your visible cube so it stands on a corner and then link it to an invisible prim that has zero rotation. Then drop a simple rotation script into the invisible parent.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested. |
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
12-11-2005 18:31
With a freshly rezzed cube, make the X and Y rotations 45-degrees each... then, add the default "Rotation Script" from your Library-->Scripts inventory folder (the default LL stuff you get). And presto, rotating cube-on-end.
|