Instantiated object grows when setting position

Godot Version

4.1.2 stable

Question

I am making a game which involves building, I am working on showing a placeholder(just a cube) where the users mouse is pointing and on click it creates a building.

when I was setting the position for an instantiated object, everything worked fine.

I am currently trying to detect all overlaps with the placeholder, so I can throw up an error if the user tries to build off of the terrain or something.

I added an AREA3D to the placeholder scene and now when I set position the placeholder grows. When I remove the AREA3D everything goes back to its original behavior.

Broken example:
rtsboiBug

I had the working example, and code and such uploaded but I am a new user so I had to remove it.

Any ideas why this behavior is occurring? I tried doing position or transform but the effect seems to be the same.

Does it really grow, or does it move towards the camera? You should check its size.
Possibly you move the object to the position where the mouse intersects with the first object, which is the green cube.

Thank you, you just helped me figure out what it most likely is. I guess when I add the Area3D, the ray cast probably intersects the placeholder, then it moves it on top of its previous location closer and closer to the camera.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.