How do I do this??
|
|
Jim Helfer
Registered User
Join date: 15 Sep 2008
Posts: 9
|
10-01-2008 09:42
I am able to do some basic scripting and am working on learning more each day. However it does not come easy to me. Very hard to wrap my head around much of this.
I have a plane that files very well but I want it to land on water. I have no problem rezzing it and having it sit on the water, or float in the water. Where my problem is is it does level out instantly or at all when it lands in the water. I need the body of the plane to position itself parallel with the surface of the water upon hitting the water. I also need it not to nose pitch down into the water when moving forward if the up cursor key is pressed.
Any help with this would be appreciated.
|
|
Taeas Stirling
Registered User
Join date: 4 Sep 2004
Posts: 74
|
10-01-2008 13:17
have a look at this thread, advanced search is our friend /54/a6/99345/1.html
|
|
Jim Helfer
Registered User
Join date: 15 Sep 2008
Posts: 9
|
That does not solve the problem
10-01-2008 14:31
Hi Taeas, thank you for providing me with that link.. My problem is not making the plane float on the water or even know when it is on the water. The problem is that when the plane touches the water on landing it does not level out. That is the fuselage does not become parallel with the water. Also when the plane begins to move forward to take off the nose should not be able to pitch down into the water. Only after the plane gets to a certain height should it be able to pitch down.
Other than that I am okay for the most part with my script. But I have no clue how to change the pitch rotation once the plane pontoons touch the water or how to keep the nose from pitching down until it is a certain number of meters above sea level.
|
|
pnc Blessed
Registered User
Join date: 27 Oct 2007
Posts: 136
|
10-01-2008 14:48
Hi Buddy I would have thought you could stop the plane when it gets to the water and use llSetRot to set it straight then use llSetStatus( STATUS_ROTATE_X | STATUS_ROTATE_Y , FALSE);to stop it rotating on the x and y then when they "TAKE OFF"llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y,TRUE);That's off the top of my head ofcourse ....
_____________________
PNC Blessed  http://slurl.com/secondlife/Caledonia/161/26/23 
|
|
bobbyb30 Swashbuckler
Registered User
Join date: 8 Sep 2008
Posts: 46
|
10-01-2008 17:02
You need to modify the plane's rotation as it approaches the water. If you don't know how...please post and I will explain further.
|
|
Jim Helfer
Registered User
Join date: 15 Sep 2008
Posts: 9
|
I don't know
10-01-2008 17:49
Hi Bobby,
That is what I do not have a clue how to do. I am just getting the hang of LSL basics. Plus as I said it is very difficult for me to wrap my head around programming.
I have gotten most stuff working okay but when the pontoons hit the water the plane should level out instantly but smoothly and also not be able to pitch nose down on take off.
I would be grateful for help with this.
|
|
Scott Savira
Not Scott Saliva
Join date: 10 Aug 2008
Posts: 357
|
10-02-2008 09:50
Jim, Have you looked over http://lslwiki.net/lslwiki/wakka.php?wakka=LindenVehicleTutorialThere are many tutorials out there in addition to that. I've not done anything with vehicles yet in LSL, but one thing I'd look at myself would be the VEHICLE_ANGULAR_FRICTION_TIMESCALE to somehow lock up that Z axis rotation. Not sure if that would be effective or not, but I think there are multiple ways to accomplish what you want.
|
|
Jim Helfer
Registered User
Join date: 15 Sep 2008
Posts: 9
|
Almost there
10-03-2008 14:48
I have got the plane not to nose dive when on water. I have got it to Rez and position itself correctly on the water. The one thing that has me stumped as I am just learning is how to make it level out instantaneously when the pontoons touch the water
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
10-03-2008 15:24
Have you considered llLookAt? http://rpgstats.com/wiki/index.php?title=LlLookAtWhen it hits the water, have it change modes or something.. and add this sort of function to the "on water" mode. These also look promising VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY VEHICLE_VERTICAL_ATTRACTION_TIMESCALE VEHICLE_FLAG_NO_DEFLECTION_UP
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
|
bobbyb30 Swashbuckler
Registered User
Join date: 8 Sep 2008
Posts: 46
|
10-03-2008 17:30
From: Jim Helfer I have got the plane not to nose dive when on water. I have got it to Rez and position itself correctly on the water. The one thing that has me stumped as I am just learning is how to make it level out instantaneously when the pontoons touch the water You could get the local position of the nose and compare it to the level of the water...
_____________________
Large supporter and contributer of LSL Editor available at lsleditor.org
|
|
Taeas Stirling
Registered User
Join date: 4 Sep 2004
Posts: 74
|
10-04-2008 12:08
well the easist way to solve your problem is to just fly your plane. if your nose down in a float plane when you hit the water in RL your in serious trouble anyway. If you insist on an auto level. Try sensing altitude with llGetPos, and cranking up the verticle attractor when below a certain point, and resetting to normal if above.
|
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
10-09-2008 11:01
Hi Jim I'm struggle with learning scripting too and I'm working on a floatplane as well.
Did you get everything working now? Would you be willing to share your script or info? Please PM me or IM me inworld if you do not wish to post here.
|