Home › Forums › General Questions › How to limit the camera panning
- This topic has 27 replies, 6 voices, and was last updated 1 year, 6 months ago by saalemv3d.
-
AuthorPosts
-
2022-04-27 at 1:19 pm #51407gf3dCustomer
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
2022-04-27 at 6:13 pm #51415xeonCustomerHey 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.com2022-04-28 at 3:41 pm #51455gf3dCustomerHi 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
2022-04-28 at 4:27 pm #51456gf3dCustomerhi me again…..the thing with the interactivity works now…
Thanks
ger
2022-04-28 at 5:34 pm #51458xeonCustomerHi 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.com2022-04-29 at 6:34 am #51469gf3dCustomerHi 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
2022-04-29 at 7:01 am #51471xeonCustomerHere 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#raycastHope this helps.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2022-04-29 at 7:30 am #51474gf3dCustomerHi 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
2022-07-30 at 9:02 am #54510thorsten moehleCustomerIf 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?
2022-07-30 at 10:19 am #54513gf3dCustomerHi Thorsten,,,thanks but problem has been solved
2022-07-30 at 10:54 am #54514thorsten moehleCustomerCool… what was the solution?
2022-08-25 at 12:35 am #55209David YanezCustomerIs 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!
2022-08-25 at 2:59 am #55211David YanezCustomerThanks 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.2022-08-25 at 10:12 am #55234kdvParticipantOne 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.
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.
2022-08-28 at 3:20 pm #55329kdvParticipantLimites 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/ad9Puzzles 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.
-
AuthorPosts
- You must be logged in to reply to this topic.