Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by BusyRoots · Mar 16, 2018 at 11:16 AM · animatorkeyframes

Unity 2D Keyframe Animation, Collider moves faster as frames

Hello everybody,


I use the keyframe functionality of the animator to move a 2D collider according to the animation frames (to detect if the pickaxe hits the stone :) ). I placed the collider manualy at the keyframes:

alt text



And the movement (lerp) of the collider between those frames does unity by itself. See animation:

test



But I noticed that the collider moves faster as the associated frame (see second .gif).


It isn't actually a problem but I'am curious if it is possible to change this somehow so that the collider is at the wanted position the same time the frame is shown (like in the first .gif)? Or is there a parameter to change the "velocity" of the collider?

I'am thankful for every answer or hint :).
Best regards,

Bredjo

keyframe.gif (175.7 kB)
keyframe-frame-by-frame.gif (182.7 kB)
Comment
Add comment
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

2 Replies

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

Answer by haruna9x · Mar 17, 2018 at 05:34 PM

In the animation window, select the animationclip, select the property you want to edit by clicking on the diamond in the row. Right click, select constant. This will turn off smoothing. (You may have to experiment first, I can not remember clearly).

Comment
Add comment · Show 1 · 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
avatar image BusyRoots · Mar 20, 2018 at 05:05 PM 0
Share

This worked. I did right click on the property (movement and rotation of the collider) and choose Both Tangents -> Constant. When I play the animation now it looked like on the first .gif from my question above. There is now lerp and just the collider at the wanted position.
Thank you :)

avatar image
0

Answer by watercat · Mar 16, 2018 at 02:39 PM

try this add 1 frame for animesion and changed the speed for animesion

Comment
Add comment · Show 3 · 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
avatar image BusyRoots · Mar 17, 2018 at 05:21 PM 0
Share

Thank you for the reply :). Do you mean adding 1 extra frame to the animation? And what do you mean with speed? The number of samples? If you mean the samples, I tested different numbers of samples but the collider is faster every time. It seams like it should be like this!?

avatar image haruna9x BusyRoots · Mar 17, 2018 at 05:34 PM 0
Share

Please use the comment if you do not answer the question.

avatar image BusyRoots haruna9x · Mar 20, 2018 at 04:58 PM 0
Share

Okay I will do that.

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

84 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Creating Animation does not record any data 1 Answer

How to scale the changes done to a transform in an Animation on various objects? 1 Answer

2D Animation does not start 1 Answer

Help with the animation window? 0 Answers

Same Animator, different clips for different objects. 0 Answers


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