Skip to content

Commit

Permalink
Removes requirement of RigidBody2D as is no longer being used by the …
Browse files Browse the repository at this point in the history
…character controller. prime31#78
  • Loading branch information
riktothepast committed Oct 16, 2018
1 parent a0d8c99 commit cab51d5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Assets/CharacterController2D/CharacterController2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Prime31 {

[RequireComponent( typeof( BoxCollider2D ), typeof( Rigidbody2D ) )]
[RequireComponent( typeof( BoxCollider2D ))]
public class CharacterController2D : MonoBehaviour
{
#region internal types
Expand Down Expand Up @@ -138,8 +138,6 @@ public float skinWidth
public new Transform transform;
[HideInInspector][NonSerialized]
public BoxCollider2D boxCollider;
[HideInInspector][NonSerialized]
public Rigidbody2D rigidBody2D;

[HideInInspector][NonSerialized]
public CharacterCollisionState2D collisionState = new CharacterCollisionState2D();
Expand Down Expand Up @@ -187,7 +185,6 @@ void Awake()
// cache some components
transform = GetComponent<Transform>();
boxCollider = GetComponent<BoxCollider2D>();
rigidBody2D = GetComponent<Rigidbody2D>();

// here, we trigger our properties that have setters with bodies
skinWidth = _skinWidth;
Expand Down
Binary file modified Assets/demo/DemoScene.unity
Binary file not shown.

0 comments on commit cab51d5

Please sign in to comment.