1
\$\begingroup\$

I put my weapon as a camera child, it works, but when i rotate my player it seems the weapon rotate a little too.

I'll attach some images so you can see it.

How the weapon is positioned

See the difference between those 2 images

enter image description here

As you can see, when i look up i can see a little bit more of the weapon and when look down to. I'm using the default 1st person script. Am i missing some important point here?

Regards, Alex.

\$\endgroup\$
1
  • \$\begingroup\$ Watch this video and you can fix it. It provides detailed explanations and is good for anyone that are making a FPS game or new to Unity youtube.com/… \$\endgroup\$
    – Xeon
    Commented Apr 24, 2013 at 9:21

1 Answer 1

1
\$\begingroup\$

Usually assign a child to camera is a bad idea. It will work, of course, but can give a little headache in your hierarchy. Try to create a new empty gameobject and assign camera and the weapon to it (even if i dont like that main camera is a child).

For your problem, i simply cant get it and your images are not clear (i didn't see anything wrong, remember that u are in First person and the prospective). If an object is a child of another one, the child object will just follow the rotation/transform update of the parent.

P.s. Try to write your own character controller, even if people say that you can use Unity without knowing programming... well, it's a lie :)

If you need more help, please explain better your problem.

\$\endgroup\$
4
  • \$\begingroup\$ Hi, i develop in C for 7 years, but my mathematics background is bad. The problem is the weapon rotates a little more, as you can see the weapon shows more when i move up/down, it should remain in the same "rotation", i think its a slerp (sorry if i said something wrong)... i compared with COD weapon rotation and the weapon don't show more or less when i look up/down, but my weapon does that. \$\endgroup\$ Commented Apr 24, 2013 at 11:17
  • \$\begingroup\$ i dont think that your weapon show more or less, it's just a question of prospective. Maybe you can have a better result with a custom shader, but im not an expert in this sector, sorry. \$\endgroup\$
    – Max
    Commented Apr 24, 2013 at 13:51
  • \$\begingroup\$ In the second image i can see more of the weapon, probably it rotated, i wanted to see it always "the same". When i rotate it seems the weapon rotates a little more \$\endgroup\$ Commented Apr 24, 2013 at 18:19
  • \$\begingroup\$ I dont know wich camera's behaviour there is behind the standard first person controller, maybe u can start from there and check if it do some camera translation/rotation \$\endgroup\$
    – Max
    Commented May 6, 2013 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .