|
Rutherford Beresford
Registered User
Join date: 2 Sep 2007
Posts: 45
|
03-03-2009 09:31
If I have a HUD attachment and I sit on a physics-enabled SL motorcycle, can I include code in my HUD to detect velociity? In other words, since I have a HUD attached to my avatar and my avatar is sitting on a motorcycle and the motorcycle is subjected to physical motion in-world, is the HUD moving, too? I want the HUD to display the motorcycle's speed and I'd rather not have to worry about communication between the bike and the HUD.
Thanks! Rutherford Beresford
|
|
Scott Savira
Not Scott Saliva
Join date: 10 Aug 2008
Posts: 357
|
03-03-2009 09:58
Would llGetObjectDetails do what you want?  Pass it the avatar's key and the OBJECT_VELOCITY parameter. Seems like it should give you the avatar's velocity (which should technically be the same as the motorcycle).
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
03-03-2009 10:03
I believe llGetVel() in an attachment of any sort returns the velocity of the avatar to which the object is attached. This is true of many physics- and position-related functions. For example: llGetPos(), llGetRot(), llApplyImpulse(), llSetForce(), llSetBuoyancy().
|
|
Rutherford Beresford
Registered User
Join date: 2 Sep 2007
Posts: 45
|
Thank you...
03-03-2009 10:32
...I'll give it a try and see what happens!
Sincerely, Ford
|