These forums are CLOSED. Please visit the new forums HERE
Vehicle script issue |
|
|
Liiya Aeon
Registered User
Join date: 23 Dec 2007
Posts: 2
|
07-22-2008 19:14
Newbie here with a small problem. I'm building a boat, and I've run into a problem with two of the free boat scripts I'm using. When I place them into my boat and try to sail it, my avatar will sit with her body facing left, instead of forward. Also, the boat will move to the side, not forward as it should. I can fix the av facing issue , but I can't figure out why my boat will sail to the side when I press my up arrow key, instead of forward. Could someone shed some light on this? I would really appreciate it.
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
07-22-2008 20:35
it depends on the exact prim that the script is in, you'll need to rotate the prim 90 degrees, or, add a box (that can be set to invisible with a clear texture), and then rotate that box until your boat is moving in the proper direction. As far as sitting is concerned, you'll need to define a sit target where I believe you can set the rotation of the avatar on the object.
http://www.secondscripter.com _____________________
My tutes
http://www.youtube.com/johanlaurasia |
|
Urrong Urnst
Registered User
Join date: 12 Jul 2008
Posts: 49
|
07-23-2008 00:39
If u changed the rotation of avatar in llSetSitTarget() change it back to how it was. Usualy the main scripts are in seats of the vehicles. So all u need to do is to use edit linked primitives and rotate the seat in the right direction (forward). If the seat has a specific shape that wouldnt look right after rotation (i.e. back rest is facing left or right) just unlink it and change the pos but remember to have main prim (seat) still rotated right. Tip: when u r buidling vehicles, all the public scripts are usualy made to move prims on their local x axis. So when making the shape make sure the vehicle is facing to the +x axis in sim (and dont rotate the seat's prim).
|
|
Cypher Ragu
[Mad Scientist]
Join date: 6 Jul 2008
Posts: 174
|
08-19-2008 23:41
-ahem-
in a way, SL is stupid. it has no idea which way is "foreward" on the objects that we create. it usually assumes that the "front" of the vehicle is along it's X axis, and that the "top" of the vehicle is along it's Z axis. Heres how to fix this without modding the scripts. 1) create a cube 2) edit it like you would any other object 3) look at the arrows that you use to move the object around 4) the red arrow is pointing to where SL assumes to be the object's front 5) rotate your boat so it is pointing in the same direction of the red arrow 6) link the BOAT to the CUBE, not the CUBE to the BOAT 7) hide the cube somewhere inside the boat put your boat script inside it, it should now work fine. |
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
08-20-2008 01:45
Newbie here with a small problem. I'm building a boat, and I've run into a problem with two of the free boat scripts I'm using. When I place them into my boat and try to sail it, my avatar will sit with her body facing left, instead of forward. Also, the boat will move to the side, not forward as it should. I can fix the av facing issue , but I can't figure out why my boat will sail to the side when I press my up arrow key, instead of forward. Could someone shed some light on this? I would really appreciate it. To change the rotation of the seated av use llSitTarget( sitPos, sitRot); http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSitTarget To change the vehicle frame rotation use: llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, rotAdjust ); http://www.lslwiki.net/lslwiki/wakka.php?wakka=vehicles _____________________
From Studio Dora
|