• 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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by perrygarg · Jun 27, 2014 at 09:47 AM · animation2dphysicscolliders

How to animate collider along with object for 2D game?

I have a polygon collider attached to my player. I am using animations on my player. While playing, collider is moving with player that is fine but it is not being animated according to character. I also tried checking ANIMATE PHYSICS check box under animator component but it is not working.

any help will be appreciated. Thanks in advance.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ado112 · Jun 27, 2014 at 10:12 AM

Mesh colliders are not very well suited for complex, moving meshes.I suggest you to use some primitive colliders like cubes,spheres,capsules.if your character is human then you can put capsule collider on it.

Comment
Add comment · Show 2 · 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 perrygarg · Jun 27, 2014 at 11:11 AM 0
Share

thanks for your response #addo112. I want to tell you that i am developing 2D game and i am applying 2D Polygon collider to my player. When my player changes its position,collider also changes with it but problem is that COLLIDER is not shaping it self(a.k.a ANIMATING) itself with player animation. Is there any way to do this? and please also tell that for what the option 'ANIMATE PHYSICS' is used in 2D games? THANKS :)

avatar image ado112 · Jun 28, 2014 at 01:03 PM 0
Share

http://docs.unity3d.com/ScriptReference/Animation-animatePhysics.html - little about animate physics. Animate physics does not make your collider animated. How did you animated your mesh(animation software or unity)? Can you post a picture of your object? You mean that collider is not following object like here: alt text

lolg.gif (195.0 kB)

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

23 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

Related Questions

Physics colliders don't follow animation 0 Answers

problem with 2d ragdoll to animation 0 Answers

Reverse animation loop stops at frame zero 0 Answers

How to check force or velocity on character? 1 Answer

SpriteManager 2 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges