feat: Sample Movements Are Now Looking Up Parents For Rigidbodies

This commit is contained in:
Syntriax 2023-03-20 22:51:49 +03:00
parent 0fc73f330b
commit a4bb04860c
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ namespace Syntriax.Modules.Movement.Samples
{
base.Start();
rigid = GetComponent<Rigidbody2D>();
rigid = GetComponentInParent<Rigidbody2D>();
groundTrigger = GetComponentInChildren<IGroundTrigger>();
if (groundTrigger != null)

View File

@ -16,7 +16,7 @@ namespace Syntriax.Modules.Movement.Samples
{
base.Start();
rigid = GetComponent<Rigidbody2D>();
rigid = GetComponentInParent<Rigidbody2D>();
groundTrigger = GetComponentInChildren<IGroundTrigger>();
if (groundTrigger != null)