Unity3D - RigidBody vs Collider
2017-07-06 17:04
225 查看
转自RigidBody vs Collider
You can indeed have a collider with no rigidbody. If there's no rigidbody then Unity assumes the object is static, non-moving. Unity does not bother testing for collisions BETWEEN static objects. As you can imagine, this is very efficient if you have lots
of scenery the player can bump into.
So the purpose of having a kinematic rigidbody, rather than no rigidbody, is to turn on collision detection between this object and all other colliders in the scene (even the static ones.) Effectively you are letting Unity know that this object moves around,
so Unity will then do collision-detection between it and everything else.
(If you had a game with only two objects in it, and both move kinematically, in theory you would only need a rigidbody on one of them, even though they both move. I haven't tried it. But now imagine three such objects- you'd have to have rigidbodies on two
of them. So in practice you'll usually just put rigidbodies on everything that both moves and collides.)
You can indeed have a collider with no rigidbody. If there's no rigidbody then Unity assumes the object is static, non-moving. Unity does not bother testing for collisions BETWEEN static objects. As you can imagine, this is very efficient if you have lots
of scenery the player can bump into.
So the purpose of having a kinematic rigidbody, rather than no rigidbody, is to turn on collision detection between this object and all other colliders in the scene (even the static ones.) Effectively you are letting Unity know that this object moves around,
so Unity will then do collision-detection between it and everything else.
(If you had a game with only two objects in it, and both move kinematically, in theory you would only need a rigidbody on one of them, even though they both move. I haven't tried it. But now imagine three such objects- you'd have to have rigidbodies on two
of them. So in practice you'll usually just put rigidbodies on everything that both moves and collides.)
相关文章推荐
- Unity3d 关于碰撞事件触发,触发器事件触发和 RigidBody以及IsKinematic RigidBody,Collider以及IsTrigger Collider 的条件总结
- [Unity] transform.Translate vs rigidbody.MovePosition?
- unity3d 中 transform.position 与Rigidbody.position的同步问题
- unity3D 使用rigidbody.AddForce(movement)
- Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.
- Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.
- Unity3D-rigidBody.velocity
- unity collider rigidbody zz
- Unity 理解刚体(Rigidbody)和碰撞体(Collider)和触发器(Is Trigger)以及刚体休眠(Rigidbody Sleeping)
- Unity3D-rigidBody.velocity
- Unity3D-rigidBody.velocity
- Unity3D-rigidBody.velocity
- Unity_Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported in Unity 5.
- unity3D 使用rigidbody.AddForce(movement)
- Unity3D下修改Polygon Collider 2D
- Unity。。。刚体在c#脚本里调用rigidbody.freezePosition或者冻结任意一个轴或组合冻结
- Unity基础包 刚体FPS RigidbodyFirstPersonController 脚本研究
- unity3d中两种语言的对比JavaScript vs C# 第四节
- Unity3d调试之UnityVs
- Unity3D中脚本的执行顺序和编译顺序(vs工程引用关系)