MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / set_scale

Method set_scale

scene/3d/node_3d.cpp:792–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790}
791
792void Node3D::set_scale(const Vector3 &p_scale) {
793 ERR_THREAD_GUARD;
794 if (_test_dirty_bits(DIRTY_EULER_ROTATION_AND_SCALE)) {
795 // Update rotation only if rotation and scale are dirty, as scale will be overridden.
796 data.euler_rotation = data.local_transform.basis.get_euler_normalized(data.euler_rotation_order);
797 _clear_dirty_bits(DIRTY_EULER_ROTATION_AND_SCALE);
798 }
799
800 data.scale = p_scale;
801 _replace_dirty_mask(DIRTY_LOCAL_TRANSFORM);
802 _propagate_transform_changed(this);
803 if (data.notify_local_transform) {
804 notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
805 }
806 fti_notify_node_changed();
807}
808
809Vector3 Node3D::get_position() const {
810 ERR_READ_THREAD_GUARD_V(Vector3());

Callers

nothing calls this directly

Calls 2

notificationFunction · 0.85
get_euler_normalizedMethod · 0.80

Tested by

no test coverage detected