Skip to content

Expose GameController haptics and motion data to Unity [fixed] #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def Main():
valid_plugin_found = True
break
else:
utility.WarningMessage(f"Ignoring unknown plug-in '{plugin_id}'. Valid options are {PluginID.ACCESSIBILITY}, {PluginID.CORE}, {PluginID.CORE_HAPTICS}, {PluginID.GAME_CONTROLLER}, {PluginID.GAME_KIT}, {PluginID.PHASE}, or {PluginID.ALL} (Default)")
CTX.printer.WarningMessage(f"Ignoring unknown plug-in '{plugin_id}'. Valid options are {PluginID.ACCESSIBILITY}, {PluginID.CORE}, {PluginID.CORE_HAPTICS}, {PluginID.GAME_CONTROLLER}, {PluginID.GAME_KIT}, {PluginID.PHASE}, or {PluginID.ALL} (Default)")

# -------------------------------------------------------------------------

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"Version": 1.0,
"Metadata":
{
"Project" : "Haptic Sampler",
"Created" : "5 June 2019",
"Description" : "A continuous event tweaked by sloped parameter curves, emphasized by a precisely placed transient event, creating the feeling of a spring or rubberband."
},
"Pattern":
[
{
"Event":
{
"Time": 0.0,
"EventType": "HapticTransient",
"EventParameters":
[
{ "ParameterID": "HapticIntensity", "ParameterValue": 0.8 },
{ "ParameterID": "HapticSharpness", "ParameterValue": 0.4 }
]
}
},
{
"Event":
{
"Time": 0.015,
"EventType": "HapticContinuous",
"EventDuration": 0.25,
"EventParameters":
[
{ "ParameterID": "HapticIntensity", "ParameterValue": 0.8 },
{ "ParameterID": "HapticSharpness", "ParameterValue": 0.4 }
]
}
},
{
"ParameterCurve":
{
"ParameterID": "HapticIntensityControl",
"Time": 0.015,
"ParameterCurveControlPoints":
[
{ "Time": 0, "ParameterValue": 1 },
{ "Time": 0.1, "ParameterValue": 0.5 },
{ "Time": 0.25, "ParameterValue": 0.0 }
]
}
},
{
"ParameterCurve":
{
"ParameterID": "HapticSharpnessControl",
"Time": 0.015,
"ParameterCurveControlPoints":
[
{ "Time": 0, "ParameterValue": 0.0 },
{ "Time": 0.25, "ParameterValue": -0.3 }
]
}
}
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"Version": 1,
"Metadata":
{
"Project" : "Haptic Sampler",
"Created" : "5 June 2019",
"Description" : "A sequence of haptic events paired with a custom audio file."
},
"Pattern":
[
{"Event":
{"Time":0,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0}
]
}
},
{"Event":
{"Time":0.391,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0},
{"ParameterID":"HapticIntensity","ParameterValue":1}
]
}
},
{"Event":
{"Time":0.8,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0.3},
{"ParameterID":"HapticIntensity","ParameterValue":1}
]
}
},
{"Event":
{"Time":1.2,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0},
{"ParameterID":"HapticIntensity","ParameterValue":1}
]
}
},
{"Event":
{"Time":1.41,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0},
{"ParameterID":"HapticIntensity","ParameterValue":1}
]
}
},
{"Event":
{"Time":1.6,"EventType":"HapticTransient",
"EventParameters":
[
{"ParameterID":"HapticSharpness","ParameterValue":0}
]
}
},
{"Event":
{"Time":0,"EventType":"HapticContinuous","EventDuration":0.2,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.6}
]
}
},
{"Event":
{"Time":0.2,"EventType":"HapticContinuous","EventDuration":0.2,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.3}
]
}
},
{"Event":
{"Time":0.4,"EventType":"HapticContinuous","EventDuration":0.15,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.25},
{"ParameterID":"HapticSharpness","ParameterValue":1.0}
]
}
},
{"Event":
{"Time":0.8,"EventType":"HapticContinuous","EventDuration":0.15,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.25},
{"ParameterID":"HapticSharpness","ParameterValue":1.0}
]
}
},
{"Event":
{"Time":1.2,"EventType":"HapticContinuous","EventDuration":0.15,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.25},
{"ParameterID":"HapticSharpness","ParameterValue":1.0}
]
}
},
{"Event":
{"Time":1.6,"EventType":"HapticContinuous","EventDuration":1,
"EventParameters":
[
{"ParameterID":"HapticIntensity","ParameterValue":0.45},
{"ParameterID":"HapticSharpness","ParameterValue":0.9},
{"ParameterID":"DecayTime","ParameterValue":1},
{"ParameterID":"Sustained","ParameterValue":0}
]
}
},
{"Event":
{
"Time":0,
"EventType":"AudioCustom",
"EventWaveformPath":"AHAP/Drums.wav",
"EventParameters":
[
{"ParameterID":"AudioVolume","ParameterValue":0.75}
]
}
}
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading