add viewport.get_camera_2d()
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code * simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results * rebased to current godot master
This commit is contained in:
parent
e849dc1791
commit
879f84d8f8
13 changed files with 113 additions and 91 deletions
|
|
@ -176,8 +176,8 @@
|
|||
[codeblock]
|
||||
# This code block is part of a script that inherits from Node3D.
|
||||
# `control` is a reference to a node inheriting from Control.
|
||||
control.visible = not get_viewport().get_camera().is_position_behind(global_transform.origin)
|
||||
control.rect_position = get_viewport().get_camera().unproject_position(global_transform.origin)
|
||||
control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin)
|
||||
control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue