Adding objects to characters in Unity

So I've finally figured out a proper way to add objects (in this case, VR goggles) to my unity 3d characters. It's much simpler than any of the tutorials I've found on the subject which didn't even work. Now I can control via bool script whether or not my character is wearing any object in the scene:

if (animator.GetBool("OutfitSwitch") == true) GameObject.Find("vr_headset").transform.localScale = new Vector3(0.01f, 0.01f, 0.01f);

I can control the scale of the clothing item and make it appear to disappear by using transform.localScale to change its size vector to (0,0,0)

My next step is to add clothing items to an array and cycle through them

Comments

  1. Harrah's Cherokee Casino & Hotel - Mapyro
    Harrah's Cherokee Casino & 안성 출장샵 Hotel 동두천 출장마사지 in Cherokee, 공주 출장샵 NC has a casino and hotel. Find reviews and information for Harrah's 포항 출장안마 Cherokee Casino & Hotel in Cherokee, 양주 출장마사지

    ReplyDelete

Post a Comment

Popular posts from this blog

Using triggers to start timeline animations

HUGE UPDATE: I CAN ANIMATE IN C4D

Installing Unity 2019