![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | bgegg |
Invalid call. Nonexistent ‘Quat’ constructor.
I thought that extends is necessary, but I get an error that it is already in use.
extends Quat
this is code i use
extends KinematicBody
var vec = Vector3()
var scale_vec = Vector3(1,1,1)
var cube
func _ready():
cube = get_tree().get_root().get_node("Spatial/KinematicBody2")
func _process(delta):
vec = Vector3()
if Input.is_key_pressed(KEY_A):
var start = self.transform.basis.z
var goal = cube.transform.basis.z
Quat(goal).slerp(start,1)
I still don’t understand how to use the Quat function
But before that i have to extend Quat
What do you want to extend Quat to? It looks like the Quat() needs the whole basis instead of its z-value.
flurick | 2019-09-03 09:48
Thank you. I seem to have misunderstood how to use it.
The error has disappeared.
bgegg | 2019-09-03 10:02