Fixed basis -> quat casting

Noticed a lot of error spat out because of unnormalized basis.
I simply followed the suggestion to use get_rotation_quat() instead of using constructor of Quat(x).
This commit is contained in:
Hanif Bin Ariffin 2019-09-23 19:09:40 -04:00
parent 9b2da1fa2f
commit 1e44578b1e
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ func _unhandled_input(ev):
func _process(delta):
var xform = get_node("testers").get_child(tester_index).get_node("MeshInstance").global_transform
var p = xform.origin
var r = Quat(xform.basis)
var r = xform.basis.get_rotation_quat()
var from_xform = get_node("camera").transform
var from_p = from_xform.origin
var from_r = Quat(from_xform.basis)