godotengine / godot

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

Numerical type does not update until inspector value is changed #97909

Open DoggyRuff6132 opened 1 month ago

DoggyRuff6132 commented 1 month ago

Tested versions

Godot 4.3 15 Aug 2024

System information

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 32.0.15.6590) - Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 Threads)

Issue description

The math doesn't work and doesn't multiply correctly. I'm not sure if it has to do with types not working or if its reading a different value. I tested it using these print statements:

image

and got these values printed out:

image

All variables in these segments are declared explicitly as floats.

However, the issue solved itself after I changed the values in the inspector, then reverted the values.

image image

Steps to reproduce

  1. Have a variable (EX: var radius = 100)
  2. Run the script by pressing the button boolean [it should work] image
  3. Now, change the variable to an explicit float (var radius : float = 100)
  4. Click the button again

It doesn't always happen, and I'm not sure why

Minimal reproduction project (MRP)

bugreport.zip

EAinsley commented 3 weeks ago

I can confirm this problem on v4.4.dev3.official [f4af8201b]. The reason doesn't seem to be within the types. After change the value in the script, the value in the inspector was not updated, nor did the reset button appear. It will continue to use the old value in the inspector.