How can I nail an arrow to an enemy(In 2D)?

Hi, Im trying to nail arrows in my first 2D game, and I cant figure out how to do it.

First I try to use fixed joints, but I cant use them in 2D.

Thanks!

You can assign a transform parent – whenever the parent moves, its children move with it.

Specifically, you probably want to set the arrow’s transform.parent to whatever you’re attaching it to.

I’m hesitant to let this through the moderation queue because it’s a frequently asked question. It’s not a bad question, we’re just trying to cut down on the number of duplicate threads in this area of the site. If you have anything else to add, feel free to comment here; if not, I’ll drop the question from the queue in a little while.

If you can’t find help, here, you can always try the forums or look up some tutorials online.