+2 votes

Okay, so I've tried to give my game a pause menu, and the game pauses, however, I keep getting this error n the debug when paused:

RayCast::_notification: Condition ' !dss ' is true. Breaking..:

and I've tried to disable both instances of a raycast being used in my code, but the error is still persisting...

Here's the relevant parts of the code:

# Spaceship.gd
# This is simply to check of a raycast that is meant to be aiming in front collides with another spaceship.
func collidinWithATarget():
    return (get_node(aimNode).is_colliding() and get_node(aimNode).get_collider().get_name() != get_name())

func playerLogic(delta):
    #Check if the movement and/or shooting keys are being pressed.
    muivin = (btn_muive.check() == 2)
    shuitin = (btn_shuit.check() == 1)

    #If they are and the ship is mobile, then set the velocity according to the input by the user.
    if active:
        if muivin:
            if btn_up.check() == 2:
                if velocity.z > -speed:
                    if velocity.z > 0:
                        velocity.z = 0
                        velocity.x = 0
                    else:
                        velocity.z -= acceleration * delta
            elif btn_doun.check() == 2:
                if velocity.z < speed:
                    if velocity.z < 0:
                        velocity.z = 0
                        velocity.x = 0
                    else:
                        velocity.z += acceleration * delta

            if btn_left.check() == 2:
                if velocity.x > -speed:
                    if velocity.x > 0:
                        velocity.x = 0
                        velocity.z = 0
                    else:
                        velocity.x -= acceleration * delta
            elif btn_richt.check() == 2:
                if velocity.x < speed:
                    if velocity.x < 0:
                        velocity.x = 0
                        velocity.z = 0
                    else:
                        velocity.x += acceleration * delta
__________
Lightning.gd

func _fixed_process(delta):
#Despite the name, this code is for raycasts detecting if another spaceship touches lighting strikes or fires from special types of spaceships.
    if activated:
        if get_node(rayCast).is_colliding():
            collision(get_node(rayCast).get_collider())

What am I doing wrong or what is going on?

in Engine by (171 points)

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.