diff options
author | Bastiaan Olij <mux213@gmail.com> | 2017-12-21 23:10:44 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2017-12-22 01:21:23 +1100 |
commit | 6fd51b6a1b1467937126334f9ffd7be3d3efbad0 (patch) | |
tree | 94407961212ff31a74db0514c3040ea35a780100 /scene | |
parent | b068961c8fe51daa388cfd14021712b00fd9aec7 (diff) |
Reserved controller ids 1 and 2 for left and right hand controllers and added new center on hmd option
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/arvr_nodes.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index e1e0b9b1ce..2bb41bf49e 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -231,7 +231,7 @@ void ARVRController::_notification(int p_what) { void ARVRController::_bind_methods() { ClassDB::bind_method(D_METHOD("set_controller_id", "controller_id"), &ARVRController::set_controller_id); ClassDB::bind_method(D_METHOD("get_controller_id"), &ARVRController::get_controller_id); - ADD_PROPERTY(PropertyInfo(Variant::INT, "controller_id", PROPERTY_HINT_RANGE, "1,32,1"), "set_controller_id", "get_controller_id"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "controller_id", PROPERTY_HINT_RANGE, "0,32,1"), "set_controller_id", "get_controller_id"); ClassDB::bind_method(D_METHOD("get_controller_name"), &ARVRController::get_controller_name); // passthroughs to information about our related joystick @@ -251,7 +251,8 @@ void ARVRController::_bind_methods() { }; void ARVRController::set_controller_id(int p_controller_id) { - // we don't check any bounds here, this controller may not yet be active and just be a place holder until it is. + // We don't check any bounds here, this controller may not yet be active and just be a place holder until it is. + // Note that setting this to 0 means this node is not bound to a controller yet. controller_id = p_controller_id; }; @@ -420,7 +421,7 @@ void ARVRAnchor::_bind_methods() { ClassDB::bind_method(D_METHOD("set_anchor_id", "anchor_id"), &ARVRAnchor::set_anchor_id); ClassDB::bind_method(D_METHOD("get_anchor_id"), &ARVRAnchor::get_anchor_id); - ADD_PROPERTY(PropertyInfo(Variant::INT, "anchor_id"), "set_anchor_id", "get_anchor_id"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "anchor_id", PROPERTY_HINT_RANGE, "0,32,1"), "set_anchor_id", "get_anchor_id"); ClassDB::bind_method(D_METHOD("get_anchor_name"), &ARVRAnchor::get_anchor_name); ClassDB::bind_method(D_METHOD("get_is_active"), &ARVRAnchor::get_is_active); @@ -430,7 +431,8 @@ void ARVRAnchor::_bind_methods() { }; void ARVRAnchor::set_anchor_id(int p_anchor_id) { - // we don't check any bounds here, this anchor may not yet be active and just be a place holder until it is. + // We don't check any bounds here, this anchor may not yet be active and just be a place holder until it is. + // Note that setting this to 0 means this node is not bound to an anchor yet. anchor_id = p_anchor_id; }; |