Skip to content

[Game Engine] : Xenko Game Studio VR Sample with the 3dRudder

Notifications You must be signed in to change notification settings

3DRudder/XenkoGameStudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

language dependencies Xenko Visual Studio 2015 Firmware 3dRudder

Xenko Game Studio VR Sample v0.1 Free Locomotion

  • Works with the Oculus Rift (Oculus Home) and the HTC VIVE (SteamVR).
  • Thanks to 3dRudder you can move with your foot (translation/rotation), and have free hand in VR.

Download Sample

Build Sample

  • Clone project
  • Clone or download 3dRudderSDK in the same parent folder
  • Start Xenko, browse for existing project and select VRSandbox.sln or VRSandbox.xkpkg
  • Copy the /../3dRudderSDK/Bin/Win32/i3DR.dll into /VRSandbox/Bin/Windows/Debug and /VRSandbox/Bin/Windows/Release
  • Build (F5)

Add 3dRudderSDK in your project

  • Clone or download 3dRudderSDK in the same parent folder of your project
  • Open your Xenko project
  • In Xenko open Visual Studio with "Project -> Open in IDE"
  • In Visual Studio right click on Reference -> Add Reference -> Select \..\3dRudderSDK\Bin\Win32\3DRudderSDK.net.dll
  • Create a SyncScript class
  • Include
    using ns3DRudder;
  • Init SDK
    private CSdk sdk;
    private CurveArray curves;
    private Axis axis;
    
    public override void Start()
    {
        sdk = i3DR.GetSDK();
        curves = new CurveArray();
        axis = new Axis();
    }
  • Get values of axis:
    public override void Update()
    {
        ErrorCode error = sdk.GetAxis(0, ModeAxis.ValueWithCurveNonSymmetricalPitch, axis, curves);
        if (error == ErrorCode.Success)
        {
            //axis.GetPhysicalRoll()
            //axis.GetPhysicalPitch()
        }
    }
  • Free SDK
    public override void Cancel()
    {
        i3DR.EndSDK();
    }
  • To build copy the /../3dRudderSDK/Bin/Win32/i3DR.dll into /VRSandbox/Bin/Windows/Debug and /VRSandbox/Bin/Windows/Release

License

3dRudder - All copyrights reserved.