Fixed nested entities stuff
This commit is contained in:
@@ -69,7 +69,7 @@ func getDirectionToFace(position:Vector3) -> Direction:
|
||||
if !characterBody:
|
||||
return Direction.SOUTH;
|
||||
|
||||
var diff = position - characterBody.position;
|
||||
var diff = position - characterBody.global_position;
|
||||
if abs(diff.x) > abs(diff.z):
|
||||
if diff.x > 0:
|
||||
return Direction.EAST;
|
||||
|
@@ -21,8 +21,8 @@ func getRaycastInteractable() -> EntityInteractable:
|
||||
|
||||
var rayDirection = entityDirection.getDirectionVector()
|
||||
var query = PhysicsRayQueryParameters3D.create(
|
||||
characterBody.position,
|
||||
characterBody.position + (rayDirection * interactRange)
|
||||
characterBody.global_position,
|
||||
characterBody.global_position + (rayDirection * interactRange)
|
||||
)
|
||||
query.collide_with_bodies = true;
|
||||
query.collide_with_areas = true;
|
||||
|
Reference in New Issue
Block a user