Closed
Description
Tested versions
v4.3.stable.official [77dcf97]
System information
macOS 10.15.7
Issue description
Camera3D.project_position(point,z_depth) return wrong value when z_depth==far
Steps to reproduce
add this script to a Camera3D:
extends Camera3D
func _ready() -> void:
far=2000
print(project_position(Vector2.ONE,999))
print(project_position(Vector2.ONE,1000))
print(project_position(Vector2.ONE,1001))
print("---")
far=1000
print(project_position(Vector2.ONE,999))
print(project_position(Vector2.ONE,1000))
print(project_position(Vector2.ONE,1001))
the log:
(-1360.407, 764.1937, -999)
(-1361.769, 764.9588, -1000)
(-1363.13, 765.7237, -1001)
---
(-1360.407, 764.1937, -999)
(-0.998264, 0.996914, -1000)
(-1363.13, 765.7237, -1001)
Minimal reproduction project (MRP)
empty project with camera3D