These forums are CLOSED. Please visit the new forums HERE
llSetRot() |
|
Nexus Nash
Undercover Linden
![]() Join date: 18 Dec 2002
Posts: 1,084
|
03-22-2003 23:39
For some reason when ever I set this as 0.9 the degs are only 84 instead of 90... if I set 1.80 the degs are 114 instead of 180.... and so on... is there anyway to get an exact value? like setting 1.80 so it is 180? I find it becomes exponential when you come closer to 180 degs... Does anyone have a solution to this?
_____________________
|
Nada Epoch
The Librarian
![]() Join date: 4 Nov 2002
Posts: 1,423
|
03-23-2003 01:51
edit i had a reply concerning that fact that the theta in the rotation was in radians, but it occurs to me that that isn't what is really going on.
nexus, could you post the exact line of code? _____________________
i've got nothing.
![]() |
Nexus Nash
Undercover Linden
![]() Join date: 18 Dec 2002
Posts: 1,084
|
03-23-2003 10:22
From what I remeber... until I get on tonight I can't post it... so i'll try to build the code again. This si for the minute hand of a clock.... is it in Radiants? becuase I thought 1.8 was 180 degs... anyways.. here the code.
rotation rot; state_entry { llListen(0,"",llGetOwner(),"" ![]() } listen(..... string message) { string minutes = (integer)message if (message < 30) { rot.x = -((minutes * 1. ![]() llSetRot(rot); } ..... } after the llSetRot there is more code... but it's an if structure that makes the :30 to :59 protion of the time.... even with this little part if "message = 15" the rotation in Degs.. will only be -84 instead of -90. _____________________
|
Wednesday Grimm
Ex Libris
![]() Join date: 9 Jan 2003
Posts: 934
|
03-23-2003 10:45
see this excelent thread:
/invalid_link.html so what you probably want is something like (note, written before coffee, so use with caution): CODE
This is for an absolute rotation about x. For rotation about y or z swap the llSin term with one of the 0 terms. For rotation about an arbitrary axis, consult your local mathematician. |
Nexus Nash
Undercover Linden
![]() Join date: 18 Dec 2002
Posts: 1,084
|
03-23-2003 10:56
Originally posted by Wednesday Grimm ^ CODE
I don't grasp the bold part... what is it? _____________________
|
Wednesday Grimm
Ex Libris
![]() Join date: 9 Jan 2003
Posts: 934
|
03-23-2003 11:06
Originally posted by Nexus Nash I don't grasp the bold part... what is it? Originally posted by Andrew Linden in the thread linked above Quaternions can be hard to grasp[...] It's just math, rotations in 3 dimensions are complicated and require 4 terms to specify. Given the way the rotations are specified in SL, it works out that the 4th term is that llCos statement. (This is a fancy way of me saying "I don't really know" ![]() |
Nexus Nash
Undercover Linden
![]() Join date: 18 Dec 2002
Posts: 1,084
|
03-23-2003 11:10
Ok this is after reading the Linden thread...
CODE
so if I need to make it say... 15th minute I can simply use 2/PI (radiants) and llEuler2Rot(<PI/2,0,0> ![]() CODE
justa question.... I would have to make a CODE
_____________________
|