also report VR events for HMD and generic tracked devices. Also expose those VR events to pybullet: expose a deviceTypeFilter, that defaults to VR_DEVICE_CONTROLLER
This commit is contained in:
@@ -2537,11 +2537,20 @@ b3SharedMemoryCommandHandle b3RequestVREventsCommandInit(b3PhysicsClientHandle p
|
||||
b3Assert(command);
|
||||
|
||||
command->m_type = CMD_REQUEST_VR_EVENTS_DATA;
|
||||
command->m_updateFlags = 0;
|
||||
|
||||
command->m_updateFlags = VR_DEVICE_CONTROLLER;
|
||||
return (b3SharedMemoryCommandHandle)command;
|
||||
}
|
||||
|
||||
void b3VREventsSetDeviceTypeFilter(b3SharedMemoryCommandHandle commandHandle, int deviceTypeFilter)
|
||||
{
|
||||
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*) commandHandle;
|
||||
b3Assert(command);
|
||||
if (command->m_type == CMD_REQUEST_VR_EVENTS_DATA)
|
||||
{
|
||||
command->m_updateFlags = deviceTypeFilter;
|
||||
}
|
||||
}
|
||||
|
||||
void b3GetVREventsData(b3PhysicsClientHandle physClient, struct b3VREventsData* vrEventsData)
|
||||
{
|
||||
PhysicsClient* cl = (PhysicsClient* ) physClient;
|
||||
|
||||
Reference in New Issue
Block a user