0 votes

I have a top down shooter that currently just shoots at the arrow key directions and I want to turn that into shooting at where the mouse is located. I was thinking about getting the mouse's global position Vector2 and set the linear_velocity of those bullets(RigidBody2d) to that vector. What are some other approaches? How would I do this using Raycast2d? And how would I lock my mouse within my game window?

in Engine by (12 points)
retagged by

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.