Jump to content

Vehicle Scripts & Sculpted Prims


Sassy Dirval
 Share

You are about to reply to a thread that has been inactive for 4292 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I've been struggling with trying to use a basic boat script in a sculpted object.

 

As soon as my watercraft moves it tilts to the default postion of the sculpt -- not the rotated position that looks correct.

 

I changed the values in  llSetVehicleRotationParam -  which postion the boat properly, but screws up direction the boat heads with the directional keys.

 

Anyone have a simple boat script (no sounds or bells and whisltes needed)  just one that can be used in a basic sculpt that gets from a to b wihout trying to drown the rider?  :)

 

 

 

 

 

Link to comment
Share on other sites

Just add a regular prim as the root and put the sript in that then rotate the sculpt child prims to whatever orientation looks right for the vehicle.

The alternative is to go reorientate the sculpt in whetever modelling app you used to create it. If you didn't create the sculpt it's back to option one, I think.

Link to comment
Share on other sites

You need not add any prim to make it right
What you want is to set VEHICLE_REFERENCE_FRAME right.
VEHICLE_REFERENCE_FRAME is a rotation used to compensate when forward isn't forward on the vehicle prim

The value of VEHICLE_REFERENCE_FRAME is not too hard to derive.

If you have already seated you avatar facing forward you can probably use the same rotation you use in llSitTarget.
If not you can use a sitTarget tool to make the default sit face forward and take the rotation calculated by the tool for VEHICLE_REFERENCE_FRAME

Link to comment
Share on other sites


Innula Zenovka wrote:

If I change VEHICLE_REFERENCE_FRAME, does that automatically correct everything,  or do I also have to change the vector value for -- for example -- VEHICLE_LINEAR_MOTOR_DIRECTION?

To my knowledge changing VEHICLE_REFERENCE_FRAME does not require any other corrections

Also my experience tells me that you should change nothing else.

What you get is the same prim only with new forward-, left- and up- sides referenced by the vehicle functions

There may be issues with center of gravity moving(in objects) and thus makes forces that attack center of gravity work differently.

I am no expert:)

Link to comment
Share on other sites

/me dances with Dora.

 

After hours and hours of wrestling with that it worked!  TY!

 

 llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0.00002, 0.68182, 0.0, -0.73152> );

 

Fixed everything.  Had the sit targets.  NOTE to anyone else using it,,, the sit target gives

"<-0.18048, -0.01340, -0.36460>, <0.00002, 0.68182, 0.00001, -0.73152>"

 

Only use the second set.

 

Done.  Working.  Happy!  Sending one your way Dora as soon as I finsh the rest of my textures :)

 

TY! TY! TY!

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4292 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...