Vehicle System scripts


#1

Looking into this:

Create a basic set of vehicular scripts for avatar-driven car driving, flying, kart racing. Should include joints or sit targets for passenger avatars to sit on.

This one was posted 10 months ago. It needs to be split into two jobs:

  • Create a basic set of vehicular scripts for avatar-driven car driving, flying, kart racing.
  • Create an vehicle sit system. Should include joints or sit targets for passenger avatars to sit on.

Two very different skills are need to fulfil each ask. For one, a vehicle is not necessarily attached to or controlled by a driver.


#2

I think I actually just yesterday figured out how to do finally do number two without requiring the user to disable their avatar collisions manually. It works even when developer menu is off.

Menu.setIsOptionChecked("Enable avatar collisions",0); // Avatar Physics Off
Menu.setIsOptionChecked("Enable avatar collisions",1); // Avatar Physics On

While it is a Hacky method of what i would like to turn into a actual feature: so will be probably taking over that ticket :slight_smile: it will be continuing on from my earlier experiments with sit scripts last year.

The main stopper however will still be the fact that the first person camera does not rotate and is locked. but doing this will probably force it.

But attachment based vehicles wouldnt work properly due a bug with MyAvatar.addThrust unfortunately


#3

Hacks seem to be the path to corrections, at least I hope so. Just having ride-on vehicles would be a nice add. I’m going to play with that part. Then later we can combine things, probably through some script to script messaging analogous to llMessageLinked(…)

Yes, attached forces is totally broken. That’s going to need a redo.


#4

Cannot a script force the camera into another mode, like entity mode? Then the camera could be adjusted.


#5

There is also a part 3 job, SFX. One wants to have the controls relayed to an effect script that triggers sounds and also, because sounds do not follow objects, the script has to manage moving the source. And too, there is no means to play sound with varying sample rates (frequency offsets from the default sampling rate). That’s interface and message recoding work.


#6

Script to script messaging can be done via messaging layer or even just by trigger external script methods directly from another script using Entities.callEntityMethod(Id, method, Params) (which is how mouse events, and equip interaction works)