mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-21 23:34:18 +00:00
Comment out more debug messages
This commit is contained in:
parent
817c7f905a
commit
153a3d040f
1 changed files with 4 additions and 4 deletions
|
@ -103,7 +103,7 @@ func _input(event: InputEvent):
|
||||||
# At this point previous shouldn't be null
|
# At this point previous shouldn't be null
|
||||||
# If it is, just try again at the next frame
|
# If it is, just try again at the next frame
|
||||||
if previous == null:
|
if previous == null:
|
||||||
print("[Ghost] Rotation occurred, but previous was null, so it was cancelled.")
|
#print("[Ghost] Rotation occurred, but previous was null, so it was cancelled.")
|
||||||
return
|
return
|
||||||
# Find the other event
|
# Find the other event
|
||||||
var other
|
var other
|
||||||
|
@ -116,15 +116,15 @@ func _input(event: InputEvent):
|
||||||
# At this point other shouldn't be null
|
# At this point other shouldn't be null
|
||||||
# If it is, just try again at the next frame
|
# If it is, just try again at the next frame
|
||||||
if other == null:
|
if other == null:
|
||||||
print("[Ghost] Rotation occurred, but other was null, so it was cancelled.")
|
#print("[Ghost] Rotation occurred, but other was null, so it was cancelled.")
|
||||||
return
|
return
|
||||||
# Find the two vectors between the touches, one using the previous position, and one using the current one
|
# Find the two vectors between the touches, one using the previous position, and one using the current one
|
||||||
var previous_vec: Vector2 = previous.position - other.position
|
var previous_vec: Vector2 = previous.position - other.position
|
||||||
var current_vec: Vector2 = event.position - other.position
|
var current_vec: Vector2 = event.position - other.position
|
||||||
print("[Ghost] previous_vec: ", previous_vec, " | current_vec: ", current_vec)
|
#print("[Ghost] previous_vec: ", previous_vec, " | current_vec: ", current_vec)
|
||||||
# Find the angle between the two vectors
|
# Find the angle between the two vectors
|
||||||
var rotation_radians = previous_vec.angle_to(current_vec)
|
var rotation_radians = previous_vec.angle_to(current_vec)
|
||||||
print("[Ghost] Rotation was successful, rotating by: ", rotation_radians)
|
#print("[Ghost] Rotation was successful, rotating by: ", rotation_radians)
|
||||||
# Apply the rotation
|
# Apply the rotation
|
||||||
rotation += rotation_radians
|
rotation += rotation_radians
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue