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
1
Question by Bigproblem01 · Mar 26, 2017 at 07:26 PM · rigidbodycollidercharacter controllerkinematicclipping

Is moving a collider without rigidbody bad?

Hi,

I have a problem which I asked about here and still didn't get a solution.

The summary of the problem is this: When the player with a character controller, and an enemy with kinematic rigidbody and a capsule collider on it crash into each other, the player just hops over the enemy. It's the problem of colliding the character controller and a kinematic rigidbody which seems to have been around quite a while and it baffles me that there's still no solution for this, as it seems to be pretty central to character controller interaction.

My question here however is whether moving a static collider (without rigidbody) still causes the whole level geometry to redraw its colliders? Because I've removed the kinematic rigidbody from my enemies, and they work well with only colliders on them (no hopping). I tried profiling the game with 20+ enemies and couldn't see any performance drop in the profiler.

So now i'm not sure if I even need to find a solution for the original problem that I had.

Is it still bad to move a collider without a rigidbody on or did Unity do something about it that I don't know?

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
Best Answer

Answer by jackhearts · Mar 27, 2017 at 08:10 PM

As from Unity 5 the physics world isn't redrawn when using the 3D (PhysX) engine to move a static collider (no rigidbody). However it is still redrawn for 2D colliders (Box2D) so if working with 2D physics make sure a rigidbody is attached. As far as I'm aware this is still the case but to be sure the profiler 'should' throw up a warning if you're moving a static collider and shouldn't be.

Comment
Add comment · Show 4 · 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 tanoshimi · Mar 27, 2017 at 08:27 PM 0
Share

Do you have a source for this? AFAI$$anonymous$$, all dynamic physics objects should have a rigidbody on them.

avatar image Bigproblem01 · Mar 27, 2017 at 09:36 PM 0
Share

Yeah I remember Profiler would throw in capital letters something like "RECALCULATE PHYSICS", which meant you were causing it to redraw physics, but in this case it's not throwing anything like that and in general stays at very good performance even with 20+ of those enemies; so I guess something must be working right.

But as tanoshimi said, could you double check somehow? Would be great to be 100% sure, just so I can move on with this problem and not worry about it further down the line.

avatar image jackhearts · Mar 28, 2017 at 12:05 PM 0
Share

@tanoshimi @Bigproblem01 - here's some links. It's someone from unity making the comment so I'd take it as solid. Whether the Box2D implementation has also changed since then I'm not sure. There's a comment mid 2016 that indicates it hasn't. If the profiler isn't showing much of a hit then go with what works though. Worth noting he says the penalty is reduced, not necessarily removed, so I'd be inclined to use a kinematic rb regardless.

Is the penalty for moving a collider without rigidbody much higher on 5.3

Unity 5: RigidBody or No RigidBody

On a side note to your original problem. The character controller isn't really meant for rigidbody physics interactions so you either have to detect and deal with them yourself in script using OnControllerColliderHit() or switch to using a rigidbody for your character. That's why your were having problems.

avatar image Bigproblem01 jackhearts · Mar 29, 2017 at 07:23 PM 0
Share

Thanks a lot jackhearts. I'm using character controller because UFPS has it and I'd like to use its other functionality, so switching to rigidbody wasn't really the best option for me, and all the workarounds using OnControllerColliderHit() seemed hacky and didn't work very smoothly, so I'm happy I can just use colliders without rigidbodies (at least for now the profiler seems completely fine with it, hope it stays that way :D )

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

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

Related Questions

Rigidbody goes crazy when isKinematic is false 1 Answer

Rigidbody + Character Controller = flight? 1 Answer

Limiting rigidbody physics influence on another rigidbody 0 Answers

A question about the Angry Bots demo. 0 Answers

Why attach a kinematic rigidbody to a collider that moves a lot? 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