feat: Sample Movements Are Now Looking Up Parents For Rigidbodies
This commit is contained in:
parent
0fc73f330b
commit
a4bb04860c
|
@ -14,7 +14,7 @@ namespace Syntriax.Modules.Movement.Samples
|
||||||
{
|
{
|
||||||
base.Start();
|
base.Start();
|
||||||
|
|
||||||
rigid = GetComponent<Rigidbody2D>();
|
rigid = GetComponentInParent<Rigidbody2D>();
|
||||||
groundTrigger = GetComponentInChildren<IGroundTrigger>();
|
groundTrigger = GetComponentInChildren<IGroundTrigger>();
|
||||||
|
|
||||||
if (groundTrigger != null)
|
if (groundTrigger != null)
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Syntriax.Modules.Movement.Samples
|
||||||
{
|
{
|
||||||
base.Start();
|
base.Start();
|
||||||
|
|
||||||
rigid = GetComponent<Rigidbody2D>();
|
rigid = GetComponentInParent<Rigidbody2D>();
|
||||||
groundTrigger = GetComponentInChildren<IGroundTrigger>();
|
groundTrigger = GetComponentInChildren<IGroundTrigger>();
|
||||||
|
|
||||||
if (groundTrigger != null)
|
if (groundTrigger != null)
|
||||||
|
|
Loading…
Reference in New Issue