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.

is any way to move camera with enableDamping?

Home Forums Puzzles is any way to move camera with enableDamping?

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #29667
    lee20
    Participant

    Hi:
    Is any way have the same camera movement done in 3d max like this sample?
    https://cdn.soft8soft.com/demo/examples/index.html#misc_controls_map

    Any way can achieve the same effect? “enableDamping” in puzzle?

    Thank you.

    #30063

    Hi,
    Yep, you can achieve that with basic JavaScript scripting. Open the example code by clicking on the right bottom button and copy-paste to your own 3D app. See here for more info.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #30372
    web
    Customer

    I would also be interested into using that feature, but couldnt get it work.

    Do you need to call app.controls.update() all the time via a whenMoved puzzle?

    #30395

    The app.controls.update(elapsed) executed automatically each frame in the App.js module. Check out the sources in your Verge3D distro (in the src/extras directory).

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #30398
    web
    Customer

    Okay, but why can’t I just use:

    function runCode(app) {
    app.controls.enableDamping = true;
    app.controls.dampingFactor = 0.05;
    }

    Or does the damping simply not work in a puzzle based app? Do you need to go all the way and used the pure javascript method?

    #30404

    According to the example, you need to use MapControls class which is exported from the jsm/controls/OrbitControls.js file (this is not the same OrbitControls we use in the engine!). Check out the following code for more info.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #30413
    web
    Customer

    Okay, will look into it. For the future I think it would be really cool if you could implement this option as a puzzle.

    #31220
    lee20
    Participant

    Hi:
    How can I incorporate the MapControls class in my project? I am using puzzle interface. The example in the library are using the hand coding script that calling the different orbit controller.
    How can archive it by using the puzzle? I alway think the puzzle is the replacement for the hand coding. I have three.js experience. do u have example that how to manipulate script section v3d coding and puzzle working together. Like orbit map control function, how can I call in different orbit controller but not using the v3d default one.

    Thank yo every much.

    #31223

    Hi,

    do u have example that how to manipulate script section v3d coding and puzzle working together.

    Please check out this page: https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html

    Chief 3D Verger | LinkedIn | Twitter

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