Vehicle.js steering and camera control


#1

Hi,

I wanted to share a script I made (rather gathered from pices), and ask for some help

What it does:

  • creates an entity (model downloaded from here)
  • switches camera to independent mode, and updates it position to be over entity
  • adds key bindings to steer the entity
    8 - forward
    5 - backward
    4 - turn left
    6 - turn right
    7 - strafe left (because we can !)
    9 - strafe right
    0 - to switch off camera check and return it’s previous mode
    use with active NumLock

In the end - should look like You are riding a tank, while Your avatar is standing where You left it.

Now, why it is not as cool I thought it would be ?
Mostly because steering is not as smooth as it should be.

Entity or camera is jiggling madly, and sometimes Interface Client seem to caught up with “real data” and teleports / rotates entity to that “real” position.
Also after steering for few seconds I’m getting errors from Interface:

[DEBUG] [04/07 02:18:56] UNEXPECTED: parsing of the octal code would make UNREASONABLY_DEEP_RECURSION... numberOfThreeBitSectionsInStream: 160 This buffer is corrupt. Returning.
[SUPPRESS] [04/07 02:18:58] 1 repeated log entries matching "UNEXPECTED: parsing of the octal code would make UNREASONABLY_DEEP_RECURSION... numberOfThreeBitSectionsInStream: \d+ This buffer is corrup
t. Returning." - Last entry: "UNEXPECTED: parsing of the octal code would make UNREASONABLY_DEEP_RECURSION... numberOfThreeBitSectionsInStream: 160 This buffer is corrupt. Returning."

Please help in dealing with this nasty effects, and point if I used something not as it should be used.


#2

I’m VERY interested in this topic as well. The core of the experience I’m building is around being inside a tank-like vehicle. I’ve tried some things like matching vehicle to MyAvatar position but it’s very poppy as the script update phases don’t seem synchronized and/or run at different frame rates.
Any help would be dearly appreciated.


#3

The only info I can provide is avatar positioning and overall animation has been re-vamped. See also theads by Summer4me… and CtrlAltDavid. Typically @Menithal can point you in the right direction on avatar related stuff. Good luck!