Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

turn to face direction of movement

Cheewha Palen
Registered User
Join date: 27 Nov 2007
Posts: 78
09-16-2008 10:01
Hello,

I am working on a hot air balloon. I didn't like the ones I found. I have the controls set up using setforce to push in one direction. the way it works is with a tap of a direction key the balloon will venture in that direction until another another direction key is pushed cancelling the last direction. I like the way this handles.

however using setforce uses vectors so the vehicle goes that way and that way only. if i tap the right arrow i go east, the left arrow west, front arrow north and back arrow south. I am ok with this but the avatar and vehicle remain facing north at all times and I would like him to turn towards direction currently heading.

I believe the key is using rot2fwd but i am missing something in the script.

can any one offer advice on using rot2fwd or tell me if there is a better method?

Thanks!
Valradica Vanek
Registered User
Join date: 1 Aug 2006
Posts: 78
balloons
09-17-2008 10:51
If your balloon is an LSL vehicle then use the rotation commands built into the vehicle controls (see the Vehicles section of the LSL Wiki) Otherwise use llSetRot() to rotate the balloon unless it is physical (then it won't work)