#Is this a bug in Godot 4.2 or something?

3 messages · Page 1 of 1 (latest)

last tinsel
#

I have this code

var body = body_preload.instantiate()

body.get_node("Area2D/CollisionShape2D").shape.radius *= 2
body.get_node("Sprite2D").scale *= 2

get_tree().root.add_child(body)

All this is supposed to do is create a sphere (I am making an N body simulation type thing), and scale it twice by scaling the collision sphere, and scaling the circle sprite, and scaling the circle sprite works fine, but for some reason the shape.radious *= 2 somehow effects future instantiations of the 'body' node. Is this a bug in godot or am I doing something wrong somehjow?

onyx sundial
#

sounds like you need to set the collision shape as "Local to Scene"

#

it's right here in the editor