simondevyoutube / Quick_3D_MMORPG

Absolutely 100% unsupported, and full of infuriating bugs.
MIT License
450 stars 172 forks source link

Camera Controls #8

Open jeremy-coleman opened 3 years ago

jeremy-coleman commented 3 years ago

This video demonstrates pretty well the behavior of wow/aion/whatever 3rd person ability game.

around 2:45 shows left click around 3:30 shows right click https://m.youtube.com/watch?v=c97Ijw_Kkq8

As best as i can articulate : left mouse is like an orbit camera , which when released , eases back to the backside of your character. But, unlike an orbit camera, It follows you using dolly camera behavior

Although not shown in the video, I think a lot of people switched the left and right mouse, also note that left and right click held together is an alternative to w to move forward. This behavior also turns your character to face where you had the camera pointing. I was thinking a compass type object could be a good abstraction for this. Note opengl uses [0,1] but webgpu uses [-1,1]

here's a babylon playground that kind of works https://playground.babylonjs.com/#GJRMS1#18

stuff https://cgcookie.com/articles/creating-a-great-game-camera