Forum rules - please read before posting.

How to make the collider of a trigger detectable if attached to a moving character.

Hello!

I tried attaching a trigger to my player in a 2d game. I want it such that a moving object can collide with the player. Like a bullet or something. But when i attach the trigger as a child to my player and move around, the trigger collider suddenly dissapears when i'm moving, and then there is no Trigger Detection happening. Any Solution to this? :)

Thanks

Comments

  • Rather than attaching a Trigger to your Player, it may be better to attach a Trigger to your bullets instead.  Multiple Triggers can share the same ActionList by setting its Actions source field to Asset File, and referring to an ActionList asset file.

    For the specific case of attaching Triggers to 2D characters, be mindful that a 2D character's root will still rotate in 3D space (hence the need for the sprite child to counter-rotate).  You can get around this by either attaching the Trigger to your sprite child, or unchecking Turn root object in 3D space? in the Player's Inspector.
  • Hey Chris!

    Awesome! That solved my issue completely. Thank you so much for your time :)
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.