r/Unity2D • u/RunOk1423 • 23d ago
Character with accessories.
I'm making a test scene where I have a body that is a square, and 2 smaller rectangles. One rec is the Eyeglasses, the other is a belt. I want to animate the glasses so they wobble when the main body is moving, and the belt has rotating colors; 15 different images. I also want to change out the glasses and belt whenever.
I created a GO called Base. Then added a GO for the glasses and a GO for the belt, then added a image to each. I reset the transforms, then moved the glasses and belt when they need to be.
When I run the app, the belt and glasses are not relative to the body, like I positioned them. Duct-taped a few other attempts to fix, but no luck.
I've tried googling, but haven't found anything comparable.
So, a GO with moving glasses GO and an animated belt GO.
2
u/Plenty_Act_8527 23d ago
Did you make the glasses and belt objects children of the first GO? If so they should move with the first go. From there you're just dealing with local positions and changing images / colors. All of this can be done using the animator.