Bit of an odd situation I'm in, but I have an animation I'm using of the player character leaping into the scene from above. I'm handling this by playing the animation while also translating the player down from one marker to another--but the result of this is that the player's shadow is following them down as the animation plays.
Because the shadow is a child of the player prefab, I'm not exactly sure how I can hide it during this animation--even if I add a visibility component to it, since the "Object>Visibility" options only affect scene objects.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Object: Visibility can affect prefabs, too - it'll do so by referring to its Constant ID value. You'll just need to ensure its consistent when placed in the scene, by checking Retain in prefab? in the Constant ID component.
Alternatively, you can disable the shadow's Renderer as part of the animation itself.
Ah, interesting! Do I need to pull the player prefab into the scene for it to appear in the object selector? I don't see a way to make it appear in the selector box unless I pull the object itself into the scene.
And regarding the suggested alternative, I'm not exactly sure how I'd go about that--but it sounds like a much more precise method of handling it!
You should be able to keep the ActionList Editor window open while viewing the Player prefab in Prefab Mode, from where you can drag the Shadow object into the Action.
If it's not easy to embed the change into the animation, you could have a separate layer in your Animator that just has a pair of animations - one to show the shadow, another to hide it - and then use a Bool parameter to show/hide it at the same time as your custom animation.
Aha, brilliant! I was able to use the Object>Visibility method to hide it, but I'm positive that Animator-based alternative will be super helpful in the future. Thanks so much, Chris!