First person camera w/ mouse controls
-
I’m making a fps (first person shooter), and I want the view to move with the mouse, but not have to click, like in free mode, have a limit to the v angle in which the camera looks at. and make the player move forward only based on the Z-rotation, not the x or y.
-
I’m making a fps (first person shooter), and I want the view to move with the mouse, but not have to click, like in free mode, have a limit to the v angle in which the camera looks at. and make the player move forward only based on the Z-rotation, not the x or y.
@remi-1286167-510cee35
This seems very similar to the Minecraft demo, where you use “lock pointer” to control the camera view using the mouse pointer:
play.creaticode.com/projects/660aa865b57a3da838c387bc
To lock the vertical angle, a simple trick is to repeatedly set the camera’s v-angle to 90 degrees whenever it is not:
-
@remi-1286167-510cee35
This seems very similar to the Minecraft demo, where you use “lock pointer” to control the camera view using the mouse pointer:
play.creaticode.com/projects/660aa865b57a3da838c387bc
To lock the vertical angle, a simple trick is to repeatedly set the camera’s v-angle to 90 degrees whenever it is not:
@info-creaticode How would I change my follow camera’s v-
rotation? -
@info-creaticode How would I change my follow camera’s v-
rotation?@remi-1286167-510cee35
If you use the pointer lock, the v-angle will be automatically changed. But you said you want to limit the v-angle?
If you want it to move freely but within a range, you can still use the same block to set the v-angle whenever it is outside the range.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login