Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by RFLG · Feb 16, 2011 at 02:20 AM · animationpausecontrolframeresume

Playing animation frame by frame depending on speed (time)

Hello everyone! I've checked the related posts to my question and the manual, but I wasn't able to find any suitable examples on how to implement my functionality.

I have an object that moves at a player controlled speed (determined via keypressed time). This object has a piece that moves closer or further away, depending on the current speed (imagine a moving rear wing like on a Porsche or on a Veyron). I can control the movement, count/keep speed and trigger the animation start without any problems.

However I feel that the whole thing would look and feel a lot better if the animation's playback rate would depend on the current speed, a bit like this:

-if speed > x, begin playback of n frames (just to start the movement) -while speed is increasing (and up to a limit of y), for each x seconds, play n frames (would raise the wing more smoothly) -if speed is reducing (and up to the lowest boundary of 0) for each x seconds, rewind n frames (would lower the wing smoothly) -if speed falls radically fast or a big collision occurs, may play a preset animation of the wing lowering (since no speed is applied here)

So, I can't seem to find a implementation example of frame-by-frame playback, pause and rewind on the docs and here on the forum...Can anyone give me some pointers about this? Thanks in advance guys!

Best Regards,

-RG

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image e-bonneville · Feb 16, 2011 at 02:35 AM 0
Share

I assume you've looked at this page? http://unity3d.com/support/documentation/ScriptReference/Animation.html

avatar image RFLG · Feb 16, 2011 at 09:45 PM 0
Share

Hi and thanks for the link, Yes I did check it, and although it was useful to kick-off the animation script, I haven't found anything there that points toward frame-by-frame animation control. I thought about using the playback speed (0=pause, if object speed is x then playback speed is y for example), but I'm not sure if that is the best way to approach this issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by roamcel · Jul 16, 2011 at 03:25 PM

I think you might be looking for this solution here: link text

which uses link text

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

How to make camera position relative to a specific target. 1 Answer

pause animation when two objects is colliding and resume when they're not colliding without rigid body? 0 Answers

How to stop sprite animation on single frame? 0 Answers

Playing animation frame by frame by procedural controller 5 Answers

Pause and resume coroutine 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges