mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-01-11 13:51:11 +01:00
Fix axis constraint logic.
This commit is contained in:
parent
9962ef777a
commit
81bfa4b6bd
@ -256,24 +256,24 @@ func set_rotate(on : bool) -> void:
|
|||||||
|
|
||||||
func set_axis_x(on : bool) -> void:
|
func set_axis_x(on : bool) -> void:
|
||||||
if on:
|
if on:
|
||||||
|
axis_constraint |= AxisConstraint.X
|
||||||
|
else:
|
||||||
if (axis_constraint & AxisConstraint.X) != 0:
|
if (axis_constraint & AxisConstraint.X) != 0:
|
||||||
axis_constraint ^= AxisConstraint.X
|
axis_constraint ^= AxisConstraint.X
|
||||||
else:
|
|
||||||
axis_constraint |= AxisConstraint.X
|
|
||||||
|
|
||||||
func set_axis_y(on : bool) -> void:
|
func set_axis_y(on : bool) -> void:
|
||||||
if on:
|
if on:
|
||||||
|
axis_constraint |= AxisConstraint.Y
|
||||||
|
else:
|
||||||
if (axis_constraint & AxisConstraint.Y) != 0:
|
if (axis_constraint & AxisConstraint.Y) != 0:
|
||||||
axis_constraint ^= AxisConstraint.Y
|
axis_constraint ^= AxisConstraint.Y
|
||||||
else:
|
|
||||||
axis_constraint |= AxisConstraint.Y
|
|
||||||
|
|
||||||
func set_axis_z(on : bool) -> void:
|
func set_axis_z(on : bool) -> void:
|
||||||
if on:
|
if on:
|
||||||
|
axis_constraint |= AxisConstraint.Z
|
||||||
|
else:
|
||||||
if (axis_constraint & AxisConstraint.Z) != 0:
|
if (axis_constraint & AxisConstraint.Z) != 0:
|
||||||
axis_constraint ^= AxisConstraint.Z
|
axis_constraint ^= AxisConstraint.Z
|
||||||
else:
|
|
||||||
axis_constraint |= AxisConstraint.Z
|
|
||||||
|
|
||||||
func _notification(what):
|
func _notification(what):
|
||||||
if what == NOTIFICATION_PREDELETE:
|
if what == NOTIFICATION_PREDELETE:
|
||||||
|
Loading…
Reference in New Issue
Block a user