mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-09-22 18:24:34 +00:00
Update vrEvent.py
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
# Line width can be changed
|
||||
|
||||
import pybullet as p
|
||||
import pybullet_data
|
||||
|
||||
CONTROLLER_ID = 0
|
||||
POSITION = 1
|
||||
@@ -13,11 +14,14 @@ BUTTONS = 6
|
||||
ANALOG_AXIS = 8
|
||||
|
||||
#assume that the VR physics server is already started before
|
||||
|
||||
c = p.connect(p.SHARED_MEMORY)
|
||||
print(c)
|
||||
if (c < 0):
|
||||
p.connect(p.GUI)
|
||||
|
||||
p.setAdditionalSearchPath(pybullet_data.getDataPath())
|
||||
|
||||
p.setInternalSimFlags(0) #don't load default robot assets etc
|
||||
p.resetSimulation()
|
||||
p.loadURDF("plane.urdf")
|
||||
|
||||
Reference in New Issue
Block a user