mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-19 00:34:28 +00:00
Fixes in TinyAudio, play sound on collision impact, can be configured in URDF/SDF file.
Requires a modified setup.py (or use premake4 to compile)
Example script:
import pybullet as p
import time
p.connect(p.GUI)
plane = p.loadURDF("plane_with_collision_audio.urdf")
box = p.loadURDF("cube.urdf",[0,0,1])
p.setGravity(0,0,-10)
while (1):
p.stepSimulation()
time.sleep(1./240.)
This commit is contained in:
@@ -164,7 +164,7 @@ int b3SoundEngine::loadWavFile(const char* fileName)
|
||||
}
|
||||
char resourcePath[1024];
|
||||
|
||||
if (b3ResourcePath::findResourcePath(fileName, resourcePath, 1024))
|
||||
if (b3ResourcePath::findResourcePath(fileName, resourcePath, 1024, 0))
|
||||
{
|
||||
b3ReadWavFile* wavFile = new b3ReadWavFile();
|
||||
wavFile->getWavInfo(resourcePath);
|
||||
|
||||
Reference in New Issue
Block a user