#How can I change a Shape / MutableShape?

1 messages · Page 1 of 1 (latest)

uneven patio
#

I made a button using a shape, and I want it to switch ton an other asset when clicked, how can I do that?

glass fox
#

then you can see which object you hit with the ray and then act accordingly

uneven patio
#

actually, I already have the onclick function, but, if I just want to replace the shape by another, do I have to create a new Shape, or can I just change the already existing one?

glass fox
#

If you just want to turn the thing into something else entirely I’d recommend hiding the shape and showing the other one in the same position (object.IsHidden)

#

The way memory works, you’ll have both objects loaded anyways, so there’s no point replacing it somehow. Better to just hide one and show the other. Apparent outcome is the same

#

and then if you want physics to still work you can make it so that the position of the object that is hidden is constantly being set to the position of the object that is shown currently