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.

How to limit the camera panning

Home Forums General Questions How to limit the camera panning

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #51407
    gf3d
    Customer

    Hi Guys,

    i´m working on a customers project….working with 3D Max

    It uses an legacy target camera with an orthographic projection…
    This works fine for the panning movement and the zooming in and out.

    The problem is ” how to limit the panning movement so the camera
    doesn´t leave the scenery…..

    Any ideas?

    here is the link to the project

    http://www.gf3d.de/Hecker_Test/Hecker_Test.html

    #51415
    xeon
    Customer

    Hey there….your project looks amazing…great work! Would like to see it when you are done.

    You can limit the panning by assigning a Collision Material to the camera. Have not tried this with an orthogonal camera but it might work.

    Step 1 create an object plane (floor) that represents the area you want the camera to be confined. Assign the floor a unique material that will not be used anywhere else in your scene. Assign that material to your to your newly created floor object and then assign the same material to the Camera Collision Material. Then hide your newly created floor and you should be good to go.

    Have a similar project coming up. If you would be interested let me know.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #51455
    gf3d
    Customer

    Hi there,

    thanks for the hint…but that doesn´t work…i allready tried that.

    Any other ideas?

    I also have another problem now in the orthograhic camaraview

    any interactivity….i want to swap to another cameraview…first person……doesn´t work.
    It does work when the camera is in perspective view….
    Even when clickable object which causes the interactivity is placed somewhere in the scene…..

    strange thing!!!!

    is it possible that interactivity doesn´t work when the camera is in orthographic view?

    to XEON ….Sure i´m interested in your upcoming project

    Greets

    Ger

    #51456
    gf3d
    Customer

    hi me again…..the thing with the interactivity works now…

    Thanks

    ger

    #51458
    xeon
    Customer

    Hi there,
    Just tried an orthogonal camera for the first time with constraint material (Orthoganal / First Person / Material Constraint) and its working well. You would have to limit the zoom ability and manage the clipping or all sorts of crazy can happen.

    You may want to consider using the constraint material with a raycast location to move the camera with a defined offsets but your specific use case may have restrictions I am not aware of.

    Good luck

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #51469
    gf3d
    Customer

    Hi Xeon,

    i think you work with blender…right?

    I work with 3D Max…..what you wrote about a solution doesn´t
    say anything to me…..

    Greets

    Ger

    #51471
    xeon
    Customer

    Here is a link to the 3ds Max version of the Verge3D manual referencing how to use the constraint material.

    https://www.soft8soft.com/docs/manual/en/max/Camera.html

    In max, under your camera settings…select First Person, then you can connect your Constraint Material.

    Information on Raycasting located here:
    https://www.soft8soft.com/docs/manual/en/puzzles/Scenes.html#raycast

    Hope this helps.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #51474
    gf3d
    Customer

    Hi Xeon,

    ok now i know what you mean…i tried that….but it doesn´t work

    its rather inpredictable….

    but i wil have another go

    greets

    Ger

    #54510
    thorsten moehle
    Customer

    If you want to do it manually :
    Add planes as limiter and use raycast every frame to check the distance to it. then use if/do position is smaller as 10 set cam position to x y z, works for me (but i only do the detection for the ground -y)

    hope this helps?

    #54513
    gf3d
    Customer

    Hi Thorsten,,,thanks but problem has been solved

    #54514
    thorsten moehle
    Customer

    Cool… what was the solution?

    #55209
    David Yanez
    Customer

    Is this workflow possible for Maya? How can you restrict the translates up to a certain point but still be able to pan within the app? Is this possible?

    Cheers!

    #55211
    David Yanez
    Customer

    Thanks for the tip! I came up with a solution using the events puzzle “on click”. What I did was to create a sphere that contains my whole environment and set its shader with a lambert set to transparency white, color black and diffuse 0. This makes the shader completely transparent, but still clickable within the app.

    Then in puzzles I used the “when click” puzzle and set it so that when click on the sphere the camera would animate to a locator set to the middle of the scene, thus limiting the pan movement navigation.

    I hope this helps others as it did me.

    Cheers!

    Attachments:
    You must be logged in to view attached files.
    #55234
    kdv
    Participant

    One more way to emulate panning with limits is to use the scene camera view offset. Looks and works nearly like panning, but it’s possible to set panning limits and the center of rotation doesn’t change.

    https://v3d.net/aa7

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

    #55329
    kdv
    Participant

    Limites panning with the orthographic scene camera on the basis of the app from the first post. Not ideal, but works almost as expected ))) And in fact, it’s not v3d panning and zooming. They are disabled.
    https://v3d.net/ad9

    Puzzles and JS coding. Fast and expensive.

    If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.

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