- Home /
Animating y only on an object resembling a bomb
Hey. I'm new to Unity 5, just started a few days ago, and I'm working on my first game just so I can get some experience regarding game development. I was able to find all answers to my problems so far but right now I have an error regarding my animation.
My code is cloning the 'bomb' and it is changing its location to (randomX, 15, 0). However, since the animation has a different x and z the error pops up to tell me that the object must be in legacy. If I recall correctly the "legacy" option was removed or disabled in Unity 5, if not I cannot find out how to enable it.
It is a very cheap game and it has so many imperfections, but I would really appreciate if someone can answer me as I don't won't to scrap this idea only to encounter the error later on. Thanks for your help :)
Could you please be more specific as to what the desired interaction is? I don't know if you are instantiating the object in at random places, if it's 2D, so please more information will help, what do you WANT to happen? Also posting the code you currently have will do wonders.
Of course. It's a 3D animation of a capsule that is falling for 15 y units. $$anonymous$$y code can has a predefined area of where it can spawn, where the x value is randomized between -12 and 12. The animator has these following values [x:36, y:15, z:0]. $$anonymous$$y problem is that I need the x to be a variable, the variable that I use in this code. (I was thinking of using Blender ins$$anonymous$$d)
I'm pretty new to coding in unity, so I presume that most of it is useless right now, sorry if I waste you time. Thanks for your concern :)
If it's a 3D game, you'd want to use RigidBody physics and not animators.