0 votes

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

in Engine by (186 points)

What do you want to extend Quat to? It looks like the Quat() needs the whole basis instead of its z-value.

Thank you. I seem to have misunderstood how to use it.
The error has disappeared.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.