Jump to content
  • Blog

VR Compatibility Guide for Aircraft Developers - Manipulators



I'm writing just a quick guide for developers.  In my 1000's of hours of experience with this, these are the best practices when assigning a manipulator type in the cockpit.obj when you want your aircraft to be fully VR compatible as well as work very well in "non-VR" - herein referred to as 2D for lack of a better term.


For Buttons: Best to just use toggle, or command.  Works great in VR or 2D.  

For knobs:  Drag Axis is probably the best if you want your 2D users to do like they would traditionally do: grab the knob and slide their mouse left/right or up/down.  This manipulator is not good for VR - BUT laminar built in a very cool feature to the vrconfig file, where we can override a drag axis and make it an axis knob - without changing the manipulator type in the cockpit.obj!  Axis knob is exactly what you want in VR.  It's an override that only happens when X-Plane detects the user is in VR mode.  Very cool.  So, what I would suggest for knobs is either make them drag_axis, axis_knobs, or command_knobs.  If you make them axis knobs or command knobs then for 2D the user will have to use the mouse wheel to manipulate them (which a lot of 2D users prefer).  If you make them drag axis', you can override them in the vrconfig file easily enough.

For 2 way switches:  Toggle is usually best.  Just a dataref toggle or "command" manipulator.  Works best for 2d and VR.

For 3 way switches:  axis_switch_up_down, axis_switch_left_right, command_switch_up_down, command_switch_left_right :  These are perfect to use for both 2d and VR.  The speed and wrist rotation and translation is finely tune-able in the VR config file.

For single levers, trim wheels, switch covers with a rotation in their animation, etc:  Please use drag_rotate, also known as the "rotate" manipulator.  It's perfect for VR AND for 2D.  Please avoid drag_axis on these if at all possible.  Drag_axis is a nightmare in VR when Rotate works so much better.

For double (or more) levers with a rotation in their animation:  You'll want a center click-spot for these - to be able to manipulate all of them at once, but that click-spot can't block them all so that you also have the ability to manipulate each one individually if need be.  These also need to be drag_rotates.  

For levers and such with ONLY a translation: You'll have to use a drag_axis or command_axis.  These are usually levers that have just a straight in/straight out animation with ZERO rotation.  The length of the axis will need to be tuned in VR, there's no way to know a good axis drag length in 2D, that really should be tuned in the VR environment.  However, once you get it dialed-in in VR it always works great in 2D.

Doors and such:  Best to just put those on a toggle animation, user just clicks it once and watches the opening/closing animation.  There are exceptions to this of course.  When you want the user to grab and turn the door handle by hand (or mouse in 2D) then you would use a drag_rotate on the handle.  The Flite Advantage T6 Texan II is a great example of this with the way they made their canopy handle and animation.  Very cool.

By the way, before I go any further in this informal guide let me just tell you...there is zero chance of someone blindly getting an aircraft ready for VR and have it working great - you could do all the technical stuff correct and have a perfectly good vrconfig file that's correctly set up "by the numbers", but these things require some intricate tuning to get everything "feeling" correct, and that tuning can only happen with a VR rig and some testing and tweaking - So without the help of someone like myself or someone else knowledgeable in X--Plane VR you would really need to get a VR rig.  


Manipulators to avoid if possible when creating aircraft to work well with both 2D and VR:

drag_xy - except for yokes, drag_xy is an unusable nightmare for VR controllers.

drag_axis_pix - does not even work at all with VR controllers.

delta and wrap - these "work" but you can almost always find another manipulator that does it better, with exceptions of course.  Sometime delta is unavoidable and must be used.  It's never great in VR, but it's manageable.


Another big tip:  When creating your cockpit obj manipulator click spots, don't forget the yoke!  If using AC3D you can bring a copy of the yoke.obj object into the cockpit obj and just set draw_disable, and then that becomes the manipulator click spot for VR controllers to operate the yoke.  If you do that, chances are the green manip click spot will z-fight with the texture of the yoke.obj, so best to scale the manipulator up or down a small percentage (depending on what green clickspot effect you want to see when grabbing the yoke with the VR controllers.  Assign the manipulator a drag_xy and give it it's datarefs like normal. 

In Blender I'm sure it's not much different, although I know they do not allow "imports" of obj files into other obj files.  So if another dev wants to chime in the comments on how a yoke manip would be created in blender I would appreciate that - my blender experience is...1 cube and 1 camera.

That's all for now, I hope this helps you wrap your mind around manipulator creation and optimization in the cockpit.obj for both 2D and VR pilots.

  • Like 2
  • Thanks 2


Recommended Comments

There are no comments to display.

  • Create New...

Important Information

Please read the Terms of Use