Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Unity 3D: When to animate, when to script

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 nitishk   Members   

163
Like
0Likes
Like

Posted 26 January 2013 - 11:19 PM

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?



#2 DavidWolfire   Members   

184
Like
3Likes
Like

Posted 27 January 2013 - 12:39 PM

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:

 

Plane

- 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.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.