0 votes

I want to know how I can make the user mark a space in the ground and click a botton to insert a new body to the scene on the spot where the user marked. . Just like in maincraft

Godot version Godot v3.4.2 stable_x11.64
in Engine by (17 points)

I'm not sure if I understand your question but you can connect a signal to your button
and then insert the desired into the scene by the signal function you connected to your button

1 Answer

+1 vote
Best answer

If you're trying to make it just like in Minecraft youll need to be using a voxel engine. The closest equivalent in godot would be to use a gridmap, but this is not a simple task.

If you just want to place at object at a selected location, youll probably need to add a reassurance node from the camera facing in the direction of the camera, and when your button is pressed you check for a collision point using that raytrace, and instance a new object there.

by (1,342 points)
selected by
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.