|
Atom Tigerfish
Registered User
Join date: 21 Dec 2008
Posts: 28
|
12-21-2008 13:36
I am looking for a way to do a smooth control joystick effect. I was thinking that if worse came to worse, I could have a small cube (the controller) inside of a big cube (barrier) that could be moved around with ctrl-grab to simulate a joystick effect, but I am looking for a way that I could smoothly move the handle of a joystick around.
Thanks,
Atom Tigerfish
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
12-22-2008 19:20
Well with the implementation of Mono, I reccomend you use the llDetectedTouch functions. Here's how I would do it: Joystick prim(child prim) "Cover" prim(A transparent cube that sits above the joystick) The object would not be physical. When a touch is detected on the cover prim, the script uses the llDetectedTouch functions to work out the local position of the touch. It then relays this information to the joystick prim, which moves accordingly. Let me know if I'm not making any sense 
_____________________
Life is a highway... And I just missed my exit.
|
|
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
|
12-23-2008 08:23
Cover prim would ideally be a sphere as well.. Another way would be to use llDetectedGrab and doing some very simple maths.
Both methods have advantages and disadvantages
Using mono touch would be easy enough to implement by offsetting the input you could directly use that as output.
llDetectedGrab would prevent someone falling off the cover prim and from ultimately losing control. But would require some maths to implement it.
_____________________
 Geometric Library, for all your 3D maths needs. https://wiki.secondlife.com/wiki/Geometric Creator of the Vertical Life Client
|
|
Atom Tigerfish
Registered User
Join date: 21 Dec 2008
Posts: 28
|
12-23-2008 14:02
Hmm... that's a good idea right there. Do you know if there is any way that I could move it smoothly like a joystick and from side to side quickly, or is the way you said going to do that?
-Atom Tigerfish
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
12-27-2008 19:14
It should work like that if the event is "touch" and not "touch_start" or "touch_end."
_____________________
Life is a highway... And I just missed my exit.
|