ErdongChen-Andrew / CharacterControl

Floating Capsule Character Controller (Rigibody control)
https://character-control.vercel.app
MIT License
378 stars 52 forks source link

Added first person view ? #2

Closed ricardo-eth closed 8 months ago

ricardo-eth commented 1 year ago

Do you think it would be easy to set up a first-person view of the character?

start in the 3rd person and when you scroll with the mouse with a transition would arrive in the first person and the same for the reverse.

Great for your work, well done!

ErdongChen-Andrew commented 1 year ago

Thank you for your feedback! The zoom in/out feature was initially added to the project, but it didn't function as smoothly as I had anticipated. Once I figure out the correct approach, I will incorporate the first-person view.

ErdongChen-Andrew commented 8 months ago

Hi @ricardo-eth , the first person view is not build in with the controller, but you can enable it by changing the settings like this: <Ecctrl camMinDis={-0.001} camFollowMult={100}>

dachieu2k2 commented 8 months ago

I think you mean camInitDis={-0.001} 😅

ErdongChen-Andrew commented 8 months ago

@dachieu2k2 setting both 'camInitDis' and 'camMinDis' to -0.001 will ensure that the camera is initially in a first-person view 😁. The 'camMinDis={-0.001}' is essential as it defines the closest point the camera can reach when zooming in.