0 votes

Does anyone know how I add a child node to the mouse to follow

in Engine by (52 points)

2 Answers

0 votes
by (1,863 points)

ya it is to put a sprite to the mouse... but it does that by making the node follow the mouse... what should it be a child of?

0 votes

In the child's node script, under the process function put

globalposition = get global_ mouse _pos()

This will set the position of the node to the mouse. There may be a better way of doing it.

by (659 points)

subtract x value from the global mouse position

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.