My project is a vr pet store where players can pick an animal and a belt to put on the animal. How to I make it so when the player picks up a belt, they can pick up any animal and attach the belt to the animal by touching the belt to the animal. The animal should look like it is wearing the belt. There are four animals (dog, cat, monkey, and penguin) that are different shapes. I need the animal to be able to wear the belt, and I need to belt to be able to be taken off by the player as well. Please help because I dont know how to do that.
PS. The animals dont move or anything, they might as well be stuffed animals that can just be picked up by the player.
PPS. I also want it so when the belt is on the animal, the animal has lower gravity and can also bounce now. If you could help me with that too it would be nice.
It sounds like you can use the standard “Attach point” for your animals, and perhaps one on your collars as well if they are not the same model between them.
Basically, on each of your animals, add an empty gameobject as a child, and move it to the location where your collar will attach. And, then add one, also as a child, to the same attach location on each collar. That is, if you have an attach point on the back of your animal’s neck, then add the other attach point to the collar’s back. Align them up in the editor, and do small adjustments as necessary by moving the collar in place and matching up the attach points. Note, that rotation also matters here.
When you want the pet to “wear” the belt, just attach them as children on the attach points, and then reset the local transforms so that it “snaps” into place.