We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

FPS Style

Home Forums Puzzles FPS Style

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #49147
    ma77hew
    Participant

    Hi,
    I’m looking to develop a FPS style in-browser application where my camera aims according to user mouse movement and moves with WASD. I have used pointer lock to make sure my camera aims in the direction of mouse movement. Using W and S keys allow the camera to move back and forth inside the scene. I imagine that I must overwrite these with custom controls?

    What tutorials are there for me to understand how to control camera movement with keys? I’ve used the Keyboard controls puzzle so far, but I can’t seem to find any tutorials on the web which explain.

    Attachments:
    You must be logged in to view attached files.
    #49150
    ma77hew
    Participant

    I have also looked for configuring WASD controls like this but cannot find the exact puzzle piece.

    https://www.soft8soft.com/wp-content/uploads/2021/11/puzzle-set-camera-param-keyboard-controls.jpg

    #49165

    hi,

    you can download an FPS example using the link in the blog post

    Chief 3D Verger | LinkedIn | Twitter

    #49181
    ma77hew
    Participant

    Ok, so I’m assuming that it is this puzzle set under “Main” that I can replicate on my own project to achieve WASD control? `

    Attachments:
    You must be logged in to view attached files.
    #49197

    yes

    Chief 3D Verger | LinkedIn | Twitter

    #49299
    GLiFTeK
    Customer

    Hi,
    You can right-click that portion of puzzles in the procedure in your image you posted, and save it to your library, then open it from your library in your own project. After reloading your browser.

    #49332
    ma77hew
    Participant

    @GLifTeK Really appreciate you sharing that tip, I didn’t know that and would’ve probably just recreated it piece by piece.

    Are there any other pieces of code I need from the snowball example in order to make my camera move WASD? I notice there isn’t anything taking control of the camera in this puzzle setup. I have imported it into my project and it’s not working as expected.

    Here’s the portion I have implemented, where / how do I specify to move the active camera?

    Attachments:
    You must be logged in to view attached files.
    #49378
    ma77hew
    Participant

    Any other assistance on this? Is there a video tutorial I can watch that can show me how to get this accomplished?

    #49399
    ma77hew
    Participant

    Please help me figure this out, I’ve been trying to do this for two weeks now.

    #49427
    ma77hew
    Participant

    This was an extremely helpful thread.

    Camera Movement For Mobile

    This puzzle combo should be saved!

    Attachments:
    You must be logged in to view attached files.
    #49435
    ma77hew
    Participant

    I’m using the puzzle setup in the comment mentioned above to achieve movement on mobile. This puzzle moves the camera every time the Up or Down button is tapped. However, you need to tap the Up / Down button constantly to move.

    I’d like to configure the Up / Down buttons to move as long as the user has their finger tapped on the screen. When they remove their finger, the button stops. I’ve used the detect touch / tap puzzle library to recreate this control, but even if I hold the mouse down / keep finger tapped on screen, the camera movement stops.

    What am I doing wrong?

    Attachments:
    You must be logged in to view attached files.
    #49462
    ma77hew
    Participant

    So i’ve been using the “every frame do” puzzle piece to continue the action once the Up buttton is pressed, however this needs to be stopped when the user lifts his finger. What makes the most sense?

    #51113

    however this needs to be stopped when the user lifts his finger

    have you found a way to break out of the “every frame” puzzle?

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.