Tsutomu Yamabushi
Scripter
Join date: 6 Sep 2005
Posts: 34
|
12-03-2005 10:44
Hi guys! I tried to build a simple clock, rotating one hand at 30° every 5 seconds with a timer event. That's not a problem, but the default rotation point is at the center of the hand (just a simple bar). I need to move the rotation point to one end of the bar now to rotate it around the center of my built clock. I tried to apply the example in the LSL wiki, but I can't figure out how the correct rotation vector has to be applied to the bar...  Can anyone give me a simple example for rotation a bar on a specified interval like a second hand on a clock would do? Thanks in advance! Tsutomu
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
12-03-2005 13:07
The easiest way is to cut the prim for the clock-hand, probably 0.375 and 0.875 although some other combinations work well too. That will give you a prim which apparently has its centre of rotation at one end (because the other half of the prim isn't drawn) so it will rotate smoothly.
|
Dyne Talamasca
Noneuclidean Love Polygon
Join date: 9 Oct 2005
Posts: 436
|
12-03-2005 13:40
Check out the clock on my tower in Acontia (see sig for location) for an example of that technique.
|
Tsutomu Yamabushi
Scripter
Join date: 6 Sep 2005
Posts: 34
|
12-04-2005 10:04
Wow, impressive piece of hardware...  That clock is built using the half-prim technic described above? I thought about that too, but it looked to me like a... well... a workaround. But I think in SL it's more important to have short calculations than correct 3D mathematics, isn't it? So I will create my clock with the half-prim technic, too. Thanks for the hints, guys! Tsutomu
|
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
|
12-04-2005 10:58
Just an idea: I made a clock using a mostly transparent texture on a flattened cylinder that just rotates the texture. I found it a lot simpler.
_____________________
http://slurl.com/secondlife/Together
|