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.

Move Camera with WASD

Home Forums General Questions Move Camera with WASD

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4051
    lightcube
    Customer

    I am curious about making the default camera navigation use WASD and Mouse to navigate as in a standard FPS?

    _________________
    Shawn Olson
    Developer of Wall Worm

    #4058

    Hi, there’s an example of such controls in the SDK, here’s the link pointerlock controls. You can find the source file of this example in the SDK at the following path: “verge3d\examples\misc_controls_pointerlock.html”

    Co-founder and lead developer at Soft8Soft.

    #4060
    lightcube
    Customer

    Excellent. Thank you.

    _________________
    Shawn Olson
    Developer of Wall Worm

    #4076
    matt
    Customer

    I have a question related to this. I have a scene created in blender with two vehicles – I’d like for the user to use the arrow keys and maybe the mouse wheel to change the position and orientation of the vehicles. How do I reference the different vehicles/objects from the .gltf file?

    #4079

    Hi matt, you can use the getObjectByName method to access different objects on a scene, for example:

    
    var v1 = app.scene.getObjectByName('myVehicle1');
    var v2 = app.scene.getObjectByName('myVehicle2');
    

    – the ‘scene’ object itself is accessible from the application instance, which in case of a standard application template in the Verge3D App Manager is a variable ‘app’, thus it’s ‘app.scene’ in the example above.

    Co-founder and lead developer at Soft8Soft.

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