GithubHelp home page GithubHelp logo

cercata / pysim2bhap Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 1.0 870 KB

bHaptics support for simulators

License: Apache License 2.0

Python 90.68% Batchfile 0.59% Lua 8.74%
bhaptics dcs msfs il-2 war-thunder raceroom dirt-rally-2 automobilista

pysim2bhap's Introduction

pysim2bhap

bHaptics support for simulators

How to use

  • Download the lastest release
  • Unzip it to a folder of your choice
  • Enable telemetry for the desired game. Instructions for each game in further sections.
  • Launch the game and the bHaptics player.
  • Launch Sim2bHap.exe, select a preset or select the options you want, then click run.
    • You can edit the Sim2bHap.ini to add your presets for you preferred planes.
    • If you change the aircraft, click stop, select new setting, and click run.

Microsoft Flight Simulator

This has started as a prototype for having some haptics feedback within MSFS, using the Tactsuit X40 Vest and Tactosy for arms from bHaptics. It should work also with the Tactsuit X16 Vest.

In order to work, you'll need to enable SimConnect in your MSFS installation.

This uses the excellent package pysimconnect from @patricksurry to get the data from the sim.

It supports 6 patterns in the Vest:

  • When the plane approaches threshold speed, upper back starts vibrating gradually.
  • When the plane approaches maximum angle of attack, my lower back starts vibrating gradually.
  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When G exceeds a certain threshold, belly starts vibrating gradually.
  • When acceleration changes too quickly, all parts of the vest vibrates.
  • When flaps and landing gear are moving, all parts of the vest vibrates.

Sim2bHap screenshot

IL-2 Sturmovik: Great Battles

You need to enable UDP motion and telemetry data by adding the following code to your data\startup.cfg file:

[KEY = motiondevice]
	addr = "127.0.0.1"
	decimation = 2
	enable = true
	port = 29373
[END]

[KEY = telemetrydevice]
	addr = "127.0.0.1"
	decimation = 2
	enable = true
	port = 29373
[END]

It supports 7 patterns in the Vest:

  • When the plane approaches threshold speed, upper back starts vibrating gradually.
  • When the plane approaches maximum angle of attack, my lower back starts vibrating gradually.
  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When G exceeds a certain threshold, belly starts vibrating gradually.
  • When acceleration changes too quickly, all parts of the vest vibrates.
  • When flaps and landing gear are moving, all parts of the vest vibrates.
  • When you fire a gun or a cannon, or when you get hit, there is vibration in the vest.

Sim2bHapIL2 screenshot

DCS World | Digital Combat Simulator

You must place DCS_To_bHap.lua in the folder C:\Users\YOUR USERNAME\Saved Games\DCS\Scripts\Hooks. If the "Hooks" folder doen's exist, create it.

This LUA script is based on the wonderfull script from FlyPT Mover by Pedro Antunes, pluse just adding a couple of variables.

It supports 7 patterns in the Vest:

  • When the plane approaches threshold speed, upper back starts vibrating gradually.
  • When the plane approaches maximum angle of attack, my lower back starts vibrating gradually.
  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When G exceeds a certain threshold, belly starts vibrating gradually.
  • When acceleration changes too quickly, all parts of the vest vibrates.
  • When flaps and landing gear are moving, all parts of the vest vibrates.
  • When you fire a gun or a cannon, or when you get hit, there is vibration in the vest.

Sim2bHapDCS screenshot

War Thunder

There is no need to configure anything in the game, the game automatically exports data via an HTTP server on port 8111.

The same patterns as DCS World are supported.

Dirt Rally 2

You have to enable udp and set extradata to 3 in file: Documents\My Games\DiRT Rally 2.0\hardwaresettings\hardware_settings_config_vr.xml

<motion_platform>
    <udp enabled="true" extradata="3" ip="127.0.0.1" port="20777" delay="1" />

It supports 3 patterns in the vest:

  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When acceleration changes too quickly, all parts of the vest vibrates.
  • When you change the gear, there is vibration in the vest.

Raceroom Racing Experience

No need to configure anything in the game, the game automatically exports data via shared memory.

It supports 4 patterns in the vest:

  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When you change the gear, there is vibration in the vest
  • When acceleration changes too quickly, the upper part of the vest vibrates.
  • If the suspension moves too quickly, the lower part of the vest closer to the wheels moving vibrates.

Project Cars 2 and Automobilista 2

Set Shared Memory to Project Cars 2 in Options->System.

It supports 4 patterns in the Vest:

  • When the RPM exceed a certain threshold, chest starts vibrating gradually.
  • When you change the gear, there is vibration in the vest.
  • When acceleration changes too quickly , the upper part of the vest vibrates.
  • If the suspension moves too quickly, the lower part of the vest closer to the wheels moving vibrates.

Thanks

  • Thanks to Nickbond for creating the patterns for feet.
  • Thanks to Polybass for early testing

pysim2bhap's People

Contributors

cercata avatar jasonjmhong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jasonjmhong

pysim2bhap's Issues

How do I disable max rpm haptic

I’m using the da20 in MSFS and it’s pulling the max rpm from telemetry so it ignore my input. I don’t like the vibrations for rpm as the plane runs at a high rpm most the time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.