Jump to content
  • Advertisement
Sign in to follow this  

Unity Unity 3D: When to animate, when to script

This topic is 2064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Something I can never understand is when should I script something and when should it be animated? I am creating a flight game and I am unsure if the elevators, rudders of the plane should be animated so an animation plays when a key is pressed or should they be scripted so that they move when the player presses a key?

Share this post

Link to post
Share on other sites

Scripting tends to give more direct and analog control, while animations are easier to deal with for complex motions (like a walk cycle or martial arts move). Airplane motions are simple and analog, so I would use scripting. You could set it up to have a hierarchy like:



- fuselage

- rudder pivot (empty)

-- rudder

- elevator left pivot (empty)

-- elevator left

- elevator right pivot (empty)

-- elevator right


And then you can just alter the rotation of the pivot objects as needed. It would also probably be possible to do it with animations by setting an additive blend layer for each movement, and combining them as needed, but I'm not as familiar with the workflow for that in Unity.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!