I’m new to unity and have only created 1 other game before so please cut me some slack!I want an object to pop out at you and when you hit/press the object it gets destroyed? I am okay with the destroy part (that’s fairly basic) but how would I the object pop out? I also want the object to get bigger when it pops out, but it is not the most important question?
Thanks in advance!!
When you say “pop out” do you mean, you want to create an object that comes toward the camera/player? If so, you can get the direction from the object to the camera by subtracting their position vectors, and move the object along that vector by a predetermined amount. The object will appear larger as it grows closer to the camera, which sounds like the effect you want.
I would create an animation, then you can either play the animation automatically on start or trigger the animation with a function (OnMouseDown, OnCollision etc).
The animation could consist of the object “popping out” by moving on the Y axis over time.
To make the object get bigger, you can scale the object up with in the same animation.
Here is an introduction video on animation…