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.

Limit Location, Apply to Camera Object?

Home Forums Graphics / Blender Limit Location, Apply to Camera Object?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #43419
    jdhutchinson
    Customer

    Limit Location
    This constraint restricts the amount of allowed translations along each axis, through lower and upper bounds.

    Can the above be applied to a camera object in the scene, to limit the possible transforms? I’ve seen some topics of how to restrict panning with threejs. Is there any existing implementation of this in v3d? Could it be scripted and executed in a puzzle?

    #43985
    Jack Seymour
    Customer

    I have tried this and it does work, however when your reach the location limit the camera’s focus continues in the direction you are panning. This can lead to some bizarre camera angles and can make it impossible to get the view back to normal.

    Where I’ve wanted to restrict panning i’ve used the ‘get distance’ puzzle to compare the camera position to the centre of my scene, and when it goes above a certain limit it brings the camera view back to the centre.

    https://discord.gg/vGMAAED
    Join the Verge 3D Discord Server!
    plz share Discord link & on your signature!

    #43992
    Avier3D
    Customer

    Where I’ve wanted to restrict panning i’ve used the ‘get distance’ puzzle to compare the camera position to the centre of my scene, and when it goes above a certain limit it brings the camera view back to the centre.

    Great to hear about your approach, I’ve played with multiple options but still not happy with a smoother experience. Would you have any puzzle example to share by chance, or more description of what you find best approach?

    No stress :good:

    #43994
    Jack Seymour
    Customer

    Sure. I agree, ideally the camera would hold its focus point and just not be allowed to move any further.

    Attached are two very simple ways I’ve restriced movement of the camera without using contraints in blender. Both examples will lose the focus of the camera without changing where the camera is looking at when they occur. For my application this works well enough.

    The reason why I include the physics version is because it will allow you to define a more complicated boundary with a mesh. I made a collision object for the camera and then parented it to it but not sure if this is necessary.

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

    https://discord.gg/vGMAAED
    Join the Verge 3D Discord Server!
    plz share Discord link & on your signature!

    #44002
    jdhutchinson
    Customer

    Hi Jack,

    That’s an interesting approach, I had thought about some sort of convex hull offset as a collision object. As with all these things, there are a lot of variables. I have a boat shape where I want people to pan across the length, and also see zoomed out from all angles and fit the entire ship in the screen.

    Have you had any problems with ‘infinite scroll’ behaviours or similar? I did an app with a soft tween at the end but there quite a few problems still.

    #44013
    Avier3D
    Customer

    Sure. I agree, ideally the camera would hold its focus point and just not be allowed to move any further.

    Ah great stuff. I made something similar before but the solution was that the tool actually needed a “story” mode to be arranged through UX, rather than absolute freedom of movement and then place “idiot proof” contraptions. Thanks for sharing, I’ll keep it in mind for when I’ll be dealing with a free-nav approach.

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