diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-07-23 14:37:26 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-07-23 14:37:26 +0300 |
commit | 140f189a65f991d5b44d49ad6b710f7512862d16 (patch) | |
tree | 514c34550c6df621353e0163ebbeabf2e14ff8db /scene/3d/spatial.h | |
parent | aa798ebf8fcc0a72c837c7daea63e6d9ef51ff30 (diff) | |
download | redot-engine-140f189a65f991d5b44d49ad6b710f7512862d16.tar.gz |
Add .to_local/.to_global methods on Node2D and Spatial
Those are just helpers around get_global_transform().affine_inverse().xform() and get_global_transform().xform().
Closes #6087
Diffstat (limited to 'scene/3d/spatial.h')
-rw-r--r-- | scene/3d/spatial.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h index d114a6231b..f22b19d3cc 100644 --- a/scene/3d/spatial.h +++ b/scene/3d/spatial.h @@ -173,6 +173,9 @@ public: void look_at(const Vector3 &p_target, const Vector3 &p_up_normal); void look_at_from_pos(const Vector3 &p_pos, const Vector3 &p_target, const Vector3 &p_up_normal); + Vector3 to_local(Vector3 p_global) const; + Vector3 to_global(Vector3 p_local) const; + void set_notify_transform(bool p_enable); bool is_transform_notification_enabled() const; |