0 votes

Bullets in 3D going: Up when looking down, down when looking up
That only happens in the "y axis" while looking to the sides and shooting works correctly.

that is the code: https://imgur.com/a/f5yP3pM

func physicsprocess(delta):

var bala = load("res://Assets/Escenes/armes/pistola/bala.tscn")
func disp():
----------if Input.isactionjustpressed("disp"):
----------------var b = bala.instance()
transform = $puntb.globaltransform
----------------b.applycentralimpulse(getparent().getparent().xform(Vector3(0, 0, 100)))

Godot version 3.4.4
in Engine by (108 points)

This issue happens only when you look straight up or down?

I can rotate horizontally to any direction, but when I look up/down, the issue happens. The bullet is shot to the front, as it should be, but up when looking down and down when looking up.
When I am not looking either up or down, just looking to the front, the bullet is shot straight, with no curvatures (as it should be)

getparent().getparent().get_parent(). ... etc

var main = get_tree().current_scene



Thanks for the advise!

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 Frequently asked questions and 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 [email protected] with your username.