mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Merge pull request #14960 from djrm/pr_fixes
Fixes 3d camera keep aspect.
This commit is contained in:
commit
cadad48482
@ -407,15 +407,6 @@ Camera::KeepAspect Camera::get_keep_aspect_mode() const {
|
||||
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) {
|
||||
|
||||
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("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("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("get_doppler_tracking"), &Camera::get_doppler_tracking);
|
||||
//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::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::OBJECT, "environment", PROPERTY_HINT_RESOURCE_TYPE, "Environment"), "set_environment", "get_environment");
|
||||
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);
|
||||
KeepAspect get_keep_aspect_mode() const;
|
||||
void set_vaspect(bool p_vaspect);
|
||||
bool get_vaspect() const;
|
||||
|
||||
void set_v_offset(float p_offset);
|
||||
float get_v_offset() const;
|
||||
|
Loading…
Reference in New Issue
Block a user