I'm following a tutorial and got stuck. My collision box won't center itself.

I’m following this tutorial http://www.mybringback.com/tutorial-series/14012/unity-2d-game-development-2-texture-materials-and-controllers/

After we turn the pill into a sprite with a face, it’s time to set up the collision box. Well, my collision box is tied to the First Person Controller, and the Graphics, the actual 3D pill with the face on it, is not sync’d up to that. They are connected to each other in that if I drag the FPC, the pill moves. However, if I move the pill, the FPC stays where it’s at.

Another problem. If I copy the x, y, and z coordinates in to one or the other, they don’t sync their positions. It’s weird, it’s as if their 0 0 0 coordinates are centered based on different references, so no matter what I do, I can’t get them to the same area. I can drag the pill, and after tedious movements and constant camera moving to figure out where to go, I can almost manually sync the pill to the FPC. There should be an easier way to do this. I don’t see why I can’t select two things and tell them to sync their centers together.

I’m using 4.3, and I realize he’s using the one before the 2D add-on. I started in 3D mode so we would go through the same steps, so I was essentially doing the same things as him.

I don’t see where I went wrong. I don’t get why the collision box is not centered in the character. Please tell me what to do, thanks.

Hey Jonjon,

I didnt look into the tutorial you’re following, so correct me if Im wrong.

From what I understand, you have your FPC as parent of the pill. This would mean if you move the Parent, all children will move with it. But if you move a child, the parent will stay right where he is.
Also, the position you are setting on the pill is a local position (Position compared to parent) and the position on the parent is a world position (Position compared to the world).

If you want the pill to be at the same position as the FPC and the pill is indeed a child of the FPC, you should just change the position of the pill to 0,0,0.

I hope this helps you, lemme know how it goes!

Well don’t I feel retarded. I thought I did that, but I guess I kept subconsciously doing it in the wrong order, and thus they’d never sync up. Thanks a lot man. Now I can finally finish this tutorial!