Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
|
08-14-2003 07:45
Hello, I'm hopeing someone has played with hinges enough in this way to coment on what I saw. I made a flywheel type thing using a hinge. I wanted this wheel to constantly turn at a constant speed all on its own. So I scripted it to do llApplyRotationalImpulse() calls. When it is too fast, the script slows it down. When its too slow, the script speeds it up. What I noticed is - the wheel always will want to turn with a 'speed' of 9.7 or 9.8. The 'speed' is what I get from llVecMag(llGetAccel()). I tried to llApplyRotationalImpulse() with a small force <0.05,0,0> or a bigger force <0.2,0,0> and I always get the wheel turning the same rate. 9.7 or 9.8 - you can verify it visually too. How can I get a constant *slower* speed?  like a 4 or a 5 
_____________________
Madox Kobayashi
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
08-14-2003 07:53
um that 'speed' you are getting is probably not speed. i bet if you looked at the vector it would be <0,0,-9.8> which is gravity.
to check the speed of the rotation, you need to use llGetOmega().
_____________________
i've got nothing. 
|
Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
|
08-14-2003 08:01
Hehe I know the 'speed' number is meaningless - it was just a number that I could use so I can talk about how fast the wheel spun, and compare different runs to each other.
llGetTorque always returned <0,0,0> - I didnt try omega. llApplyRotationalForce() affects accelleration I figure so I used GetAccel().
But aside from that measurement, a small force didnt turn the wheel slower, it turned it at the same 'speed' as a stronger force and you can *see* that, you dont have to use a number for that.
_____________________
Madox Kobayashi
|
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
|
08-14-2003 08:38
default { state_entry() { llMoveToTarget(llGetPos(),0.1); llSetStatus(STATUS_PHYSICS|STATUS_BLOCK_GRAB,TRUE); llSetTimerEvent(1.0); }
touch_start(integer total_number) { llApplyRotationalImpulse(<0,0,0.25>,FALSE); }
timer() { llSetText((string)llGetOmega(),<1,1,1>,1); } } ok so i just ran this test, and i saw varying speed, up to a point. anything over about 19 looked about the same.
_____________________
i've got nothing. 
|
Madox Kobayashi
Madox Labs R&D
Join date: 28 Jun 2003
Posts: 402
|
08-14-2003 08:49
Thanks a lot for looking into that  I'll have to go see what the omega values I'm getting and why I didnt see what you saw
_____________________
Madox Kobayashi
|