Home › Forums › Graphics / Blender › Limit Location, Apply to Camera Object?
- This topic has 5 replies, 3 voices, and was last updated 3 years, 2 months ago by Avier3D.
-
AuthorPosts
-
2021-08-03 at 9:31 pm #43419jdhutchinsonCustomer
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?
2021-08-25 at 10:30 am #43985Jack SeymourCustomerI 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!2021-08-25 at 11:49 am #43992Avier3DCustomerWhere 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
2021-08-25 at 1:04 pm #43994Jack SeymourCustomerSure. 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!2021-08-25 at 11:45 pm #44002jdhutchinsonCustomerHi 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.
2021-08-26 at 5:35 am #44013Avier3DCustomerSure. 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.
-
AuthorPosts
- You must be logged in to reply to this topic.