Add binding for GetScreenToWorld2D
This commit is contained in:
parent
8f46e31841
commit
ee8229b508
1 changed files with 9 additions and 0 deletions
|
@ -296,6 +296,15 @@ func GetWorldToScreen2D(position Vector2, camera Camera2D) Vector2 {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetScreenToWorld2D - Returns the world space position for a 2d camera screen space position
|
||||||
|
func GetScreenToWorld2D(position Vector2, camera Camera2D) Vector2 {
|
||||||
|
cposition := position.cptr()
|
||||||
|
ccamera := camera.cptr()
|
||||||
|
ret := C.GetScreenToWorld2D(*cposition, *ccamera)
|
||||||
|
v := newVector2FromPointer(unsafe.Pointer(&ret))
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
// GetCameraMatrix - Returns camera transform matrix (view matrix)
|
// GetCameraMatrix - Returns camera transform matrix (view matrix)
|
||||||
func GetCameraMatrix(camera Camera) Matrix {
|
func GetCameraMatrix(camera Camera) Matrix {
|
||||||
ccamera := camera.cptr()
|
ccamera := camera.cptr()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue