Forum rules - please read before posting.

Player vicinity tutorial causes player character to fall over

edited August 2014 in Technical Q&A
Hi guys, 

I have a basic scene set up and I completed the tutorial on adding a circleCollider2D to my character so I can enable player vicinity hotspot detection. I created an empty game object, added a circleCollider2D to it, set the collider to "is trigger", added the detect hotspot component and made this game object a child object of the player. Then I went into the player script and paired the new hotspot detect object to the hotspot detector child field of the player script. 

What happens is when I press play, the character falls backwards and swings upside-down from the collider attached at his feet (kinda like a upside down bird on a wire). 

I have no idea why this is happening and what is more frustrating is that when I remove the hotspot child object, everything is fine again. There is only a few steps to do this and I have analyzed each one but still can't figure this out. It probably has some simple solution that I am going to facepalm over, but if anyone could expedite said facepalm it would be greatly appreciated. Thank you in advance.

Sincerely,

-Orvekio

Comments

  • Very strange!

    The steps you've taken are correct - provided you're using "Unity 2D" mode (the other 2D methods still requite SphereColliders).

    Try removing any Rigidbody components there may be on your prefab.  It shouldn't affect things, but if you're getting "swinging" behaviour it sounds like a physics issue.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.