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
2
Question by Kokkababa · Jun 19, 2016 at 08:30 PM · collidersprite animation

How to update 2d colliders with spirte animation ?

Hi, I have attached a 2d collider to my game object, but when animation is playing the collider is not updating, can anyone tell me how to update collider with the animation? Thanks

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

4 Replies

· Add your reply
  • Sort: 
avatar image
10

Answer by thor348k · Jun 22, 2016 at 05:08 AM

By your question, I assume you already know how to make an animation, and add it to a controller.

When editing the animation, or when you're adding frames, you should notice the record button is selected. While this is set, you can change other properties for the controller's object. Which means, you can adjust the collider size to fit, at each frame.

Colliders don't automatically adjust to fit the individual sprite frames.

Hope this helps! :)

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 MonteyMontey · May 02, 2017 at 02:36 PM 0
Share

Do you know how you do that? Because when I try to add a collider property to my animation, I can only choose between "Enabled", "IsTriggerd" and stuff like that. I don't see how I can change the collider somewehere. Would be great to get an answer, I really need it!

avatar image unity_ncYJzNtfp11y-Q · May 09, 2018 at 05:01 PM 0
Share

Hi thanks for your response, I've done exactly as you said, but when I edit the collider to match the current sprite, it changes the collider to that for all the sprites (overwrites all other collider changes). I'm not sure what I'm doing wrong, any response would be appreciated!

avatar image awsapps · Oct 19, 2021 at 10:58 AM 0
Share

Wrong answer, you can't record changes in colliders such as Polygon Collider 2D :/

avatar image
1

Answer by shieldgenerator7 · Nov 13, 2017 at 07:54 PM

You have to add a Collider2D to the GameObject (such as BoxCollider2D), and then on the animation pane, click the record button. Then for each frame you want to change the collider, click the "Edit Collider" button on the collider's component in the Inspector pane, and adjust it to what you need.

The animation has no "collider" propety. The collider is a component on the GameObject that has the Animator.

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 awsapps · Oct 19, 2021 at 11:00 AM 0
Share

Did you try that? You can't record Polygon2D colliders!

avatar image
1

Answer by Solitari · Jul 19, 2020 at 03:53 AM

I didn’t imagine that unity had this problem, it’s not possible to make fluid animation, because the box collider, a capsule collider or other doesn’t follow the animation, and if you do step by step, you never record properly, and when you record, you record for others animations

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
avatar image
0

Answer by awsapps · Oct 19, 2021 at 11:02 AM

Set up as many child objects as different colliders you have, for each one, place the collider to fit the animation. While animating, active the corresponding child object...

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

10 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

Related Questions

Wanting to have a sprite animation to only start playing once the player collides with it? 1 Answer

Internal collisions 1 Answer

How can i make different OnTriggerEnter actions into one Script? 2 Answers

how to change physics material of a colider in runtime 5 Answers

Why setting an active object to false returns error of 'Object reference not set to an instance of an object' 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