Hertzole / gold-player

A first person player controller for Unity.
MIT License
160 stars 16 forks source link

Unsure how to properly setup. #35

Closed Tonfa117 closed 3 years ago

Tonfa117 commented 3 years ago

Hi, I'm trying to get a simple capsule player set up to test out some ideas but I can't quite figure out how to get the gold player controller to work. I have the CameraHead and the TargetCamera set as the camera in the player's head, but I can't figure out how to get the HeadBob working. If I set the HeadBob to the capsule, it puts the camera at the correct height and the Bob works perfect, but I can't rotate the camera horizontally with the mouse. Any help would be appreciated. I love the UI for this and the features seem amazing. I really want to know how to use it properly to take full advantage of it.

Thank you!

Hertzole commented 3 years ago

Hi there! Thanks for checking it out! I'll do my best to help you! You've done the right thing with having a camera head and a camera under that. That is the set up I recommend. But when headbob is involved, due to how it doesn't play very nicely with rotations, you'll need another object that would be the parent of your camera head. So it would look something like this...

Then in the headbob you should assign the bob target to the bob target.

If you create a gold player controller using Create - 3D Object - Gold Player Controller you should be able to see the recommended setup. I hope this helps you! :)

Tonfa117 commented 3 years ago

Wow, my dumbass didn't see that you could just create one already. I was trying to add everything to an existing capsule. Thank you so much!

I'm slowly working on a little pet project of a horror game and this was the first step. Since you helped so quickly I'd be willing to let you check out some early builds of the game if you'd like once I get there. 😄

Hertzole commented 3 years ago

I'm glad I could help! And I'd love to check out your game! You can reach out to me either using contact@hertzole.se or DM me on twitter when you feel ready! :)