- Home /
Camera animation
I want to play a camera animation when i'm not holding any button down ,so when you move your mouse around the animation stops . i ONLY want the animation to play when you're holding NOTHING , so if you move the mouse around then the animation will also stop.
Cameras dont do animations...You apparently are missing the understanding how Unity and animations work. A camera is just a simple object that views the scene. Its take you to move it around as you please, but there are no animations viable for it to do...it just doesnt do that.
well just tell me how i can play an animation with a game object when no button is pressed...
What animation? You can create objects in a graphics/animation program that you can export to Unity which can be manipulated to work within the engine. It depends on what animations you want. You can use Unitys basic animation design if its not a humanoid system which will be much more complex with $$anonymous$$echanim.
Thing is, do you have an object importing that already has animation that you are trying to access?
Itd be helpful if you explained what you have going on and how you want it to work in detail.
Answer by KiraSensei · Aug 05, 2013 at 08:05 AM
Try this in your Update() method :
if(Input.anyKey == false)
{
// your camera animation code
}
Your answer
Follow this Question
Related Questions
How do I rotate a character with my mouse? 1 Answer
Select/Drag/Drop Objects with a mouse 0 Answers
using left right keys to turn 1 Answer