Fixes 3d camera keep aspect.
This commit is contained in:
parent
32d8b99bc3
commit
1696db8f00
2 changed files with 0 additions and 14 deletions
|
@ -407,15 +407,6 @@ Camera::KeepAspect Camera::get_keep_aspect_mode() const {
|
||||||
return keep_aspect;
|
return keep_aspect;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera::set_vaspect(bool p_vaspect) {
|
|
||||||
set_keep_aspect_mode(p_vaspect ? KEEP_WIDTH : KEEP_HEIGHT);
|
|
||||||
_update_camera_mode();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Camera::get_vaspect() const {
|
|
||||||
return keep_aspect == KEEP_HEIGHT;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Camera::set_doppler_tracking(DopplerTracking p_tracking) {
|
void Camera::set_doppler_tracking(DopplerTracking p_tracking) {
|
||||||
|
|
||||||
if (doppler_tracking == p_tracking)
|
if (doppler_tracking == p_tracking)
|
||||||
|
@ -468,14 +459,11 @@ void Camera::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_environment"), &Camera::get_environment);
|
ClassDB::bind_method(D_METHOD("get_environment"), &Camera::get_environment);
|
||||||
ClassDB::bind_method(D_METHOD("set_keep_aspect_mode", "mode"), &Camera::set_keep_aspect_mode);
|
ClassDB::bind_method(D_METHOD("set_keep_aspect_mode", "mode"), &Camera::set_keep_aspect_mode);
|
||||||
ClassDB::bind_method(D_METHOD("get_keep_aspect_mode"), &Camera::get_keep_aspect_mode);
|
ClassDB::bind_method(D_METHOD("get_keep_aspect_mode"), &Camera::get_keep_aspect_mode);
|
||||||
ClassDB::bind_method(D_METHOD("set_vaspect"), &Camera::set_vaspect);
|
|
||||||
ClassDB::bind_method(D_METHOD("get_vaspect"), &Camera::get_vaspect);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_doppler_tracking", "mode"), &Camera::set_doppler_tracking);
|
ClassDB::bind_method(D_METHOD("set_doppler_tracking", "mode"), &Camera::set_doppler_tracking);
|
||||||
ClassDB::bind_method(D_METHOD("get_doppler_tracking"), &Camera::get_doppler_tracking);
|
ClassDB::bind_method(D_METHOD("get_doppler_tracking"), &Camera::get_doppler_tracking);
|
||||||
//ClassDB::bind_method(D_METHOD("_camera_make_current"),&Camera::_camera_make_current );
|
//ClassDB::bind_method(D_METHOD("_camera_make_current"),&Camera::_camera_make_current );
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "keep_aspect", PROPERTY_HINT_ENUM, "Keep Width,Keep Height"), "set_keep_aspect_mode", "get_keep_aspect_mode");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "keep_aspect", PROPERTY_HINT_ENUM, "Keep Width,Keep Height"), "set_keep_aspect_mode", "get_keep_aspect_mode");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "vaspect"), "set_vaspect", "get_vaspect");
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mask", PROPERTY_HINT_LAYERS_3D_RENDER), "set_cull_mask", "get_cull_mask");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment");
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "h_offset"), "set_h_offset", "get_h_offset");
|
||||||
|
|
|
@ -148,8 +148,6 @@ public:
|
||||||
|
|
||||||
void set_keep_aspect_mode(KeepAspect p_aspect);
|
void set_keep_aspect_mode(KeepAspect p_aspect);
|
||||||
KeepAspect get_keep_aspect_mode() const;
|
KeepAspect get_keep_aspect_mode() const;
|
||||||
void set_vaspect(bool p_vaspect);
|
|
||||||
bool get_vaspect() const;
|
|
||||||
|
|
||||||
void set_v_offset(float p_offset);
|
void set_v_offset(float p_offset);
|
||||||
float get_v_offset() const;
|
float get_v_offset() const;
|
||||||
|
|
Loading…
Reference in a new issue