godot_real GDAPI godot_arvr_get_controller_rumble(godot_int p_controller_id) { ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL_V(arvr_server, 0.0); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, p_controller_id); if (tracker != NULL) { return tracker->get_rumble(); } return 0.0; }
real_t ARVRController::get_rumble() const { // get our ARVRServer ARVRServer *arvr_server = ARVRServer::get_singleton(); ERR_FAIL_NULL_V(arvr_server, 0.0); ARVRPositionalTracker *tracker = arvr_server->find_by_type_and_id(ARVRServer::TRACKER_CONTROLLER, controller_id); if (tracker == NULL) { return 0.0; }; return tracker->get_rumble(); };