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.

Ehanced camera controls how to…

Home Forums General Questions Ehanced camera controls how to…

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #39768
    picpic2006
    Participant

    Hi, i’m new in verge3d, i’m trying to understand all concepts behind, it seem to be a powerful tool. i try to replicate this kind of demo with it, but i can’t find any sources to understand how to work with the camera to control orbit like this !

    https://threejs.org/examples/#misc_controls_map
    :good:
    Thanks

    #39784

    Hi,

    controls of such type can only be implemented via JavaScript coding at the moment. That demo serves as an example on how to do that.

    Chief 3D Verger | LinkedIn | Twitter

    #39786
    angus
    Customer

    Hi Yuri,

    This seems to be the most fundamental thing people need. On the Verge 3D puzzles section there is no class for ‘navigation’, given that everyone is asking for this could this not just be added into the Verge 3D puzzles section, so the ability to use WASD to control the camera and to fly

    #39789

    Verge3D supports first-person controls out of the box. This is map navigation controls that require coding.
    E.g. for Blender
    https://www.soft8soft.com/docs/manual/en/blender/Camera.html#firstperson_camera_settings

    Chief 3D Verger | LinkedIn | Twitter

    #39792
    picpic2006
    Participant

    thanks for the reply, i understand that i have to do this by code, the probleme is how to import orbitcontrol.js from this exemple and use it for the camera can we do that with puzzle or should i import it in a given script and pass the camera to it ?

    https://threejs.org/examples/#misc_controls_map

    #39836
    picpic2006
    Participant

    Hi

    I tried several things but nothing work for me at the moment.
    I read the documentation, i found that i can pass code in runcode function.

    https://cdn.soft8soft.com/demo/examples/index.html?q=misc#misc_controls_orbit

    In this exemple all the scene is created by code that is less difficult to understand to me but my test is made with the default template so my camera is all ready done in blender. I made it with no controls but now i have to point to it and pass to orbitcontrols and do see where to do that. I try to my project.html, but didn’t work to.
    Can you give me a way to go for the moment i’m in a dark room :wacko:

    #39888
    picpic2006
    Participant

    hi, i finally manage to import and use orbitcontrol
    First i added in my .html
    type module to import in ncsExplorer the script

    <script type=”module” src=”NCSExplorer.js”></script>

    then in my javascript

    import { OrbitControls } from ‘./OrbitControls.js’;

    and finally

    function runCode(app) {

    var cam = app.scene.getObjectByName(‘MaCameraFixe’);
    var controls = new OrbitControls(cam,app.renderer.domElement);
    controls.enableDamping = true; // an animation loop is required when either damping or auto-rotation are enabled
    controls.dampingFactor = 0.05;
    controls.screenSpacePanning = false;
    controls.minDistance = 100;
    controls.maxDistance = 3000;
    controls.maxPolarAngle = Math.PI / 2.5;

    }

    Do you think this is the way ?

    For me it work locally but i can’t upload to the serveur i couldn’t load my resource ! :wacko:

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