godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.21k stars 19.6k forks source link

Node3D objects will not render when changing scale #93651

Open AlanZhouSS opened 1 month ago

AlanZhouSS commented 1 month ago

Tested versions

v4.3.beta2.official [b75f0485b]

System information

Godot v4.3.beta2 - macOS 14.5.0 - Vulkan (Mobile) - integrated Apple M1 - Apple M1 (8 Threads)

Issue description

MeshInstance3D objects will not render when changing SecondNode3D scale. Code when hidden

mesh_instance.scale = Vector3(0.6, 0.6, 0)

But when I use the following code, it will render

mesh_instance.scale = Vector3(0.6, 0.6, 0.6)

I'm not sure if this is correct

Steps to reproduce

extends Node3D

@onready var mesh_instance = $Camera3D/Node3D

func _ready() -> void:
    change_size()

func change_size():
    mesh_instance.scale = Vector3(0.6, 0.6, 0)

Minimal reproduction project (MRP)

Scene tree structure:

20240627-155554

huwpascoe commented 1 month ago

It's child of the camera node so it's probably out of view somehow.

Zireael07 commented 1 month ago

You set one of the components of scale to 0, of course it won't render

huwpascoe commented 1 month ago

You set one of the components of scale to 0, of course it won't render

It should still render though. I present to you a torus of scale.y = 0 image

AlanZhouSS commented 1 month ago

You set one of the components of scale to 0, of course it won't render

It should still render though. I present to you a torus of scale.y = 0 image

Yes, when I create a mesh object in the scene and modify the scale value in the editor interface instead of using a script, the object will be rendered.