sceneview-android icon indicating copy to clipboard operation
sceneview-android copied to clipboard

ModelNode, set minZoom/maxZoom allowed while zooming in/out camera

Open gabrielazwaat opened this issue 3 years ago • 5 comments

hello dears, I would like to disable zooming for my 3d model, is there any option to set max scale or disable scale from modelNode, As well I am still not able to set max rotation angles to the camera manipulator while rotating, I would like the scene to stop rotating after reaching a certain angle from right left top and bottom, is that possible doable, appreciate your help

gabrielazwaat avatar Aug 16 '22 15:08 gabrielazwaat

Hi! Scaling can be disabled using this property: https://github.com/SceneView/sceneview-android/blob/00bae0697efa8fad30c1922def99794e49a7a712/sceneview/src/main/java/io/github/sceneview/node/Node.kt#L311

The minimum and maximum scale can be set using these properties: https://github.com/SceneView/sceneview-android/blob/00bae0697efa8fad30c1922def99794e49a7a712/sceneview/src/main/java/io/github/sceneview/node/Node.kt#L320

And I see that you've already found the issue about restricting the camera angles #62

grassydragon avatar Sep 01 '22 07:09 grassydragon

Thank you for you answer, Regarding scale disable i tried all of these option, but still when i zoom into the modelNode, i am not able to set a max scale or disable the scale below is what I tried, should i do it another way, thank you for your support sceneView.cameraNode.isScaleEditable = false modelNode.parentNode?.isScaleEditable = false modelNode.isScaleEditable = false

gabrielazwaat avatar Sep 08 '22 12:09 gabrielazwaat

Hi! Can it be so that the model isn't scaled but the camera is zoomed in and out?

grassydragon avatar Sep 09 '22 07:09 grassydragon

Hi! Can it be so that the model isn't scaled but the camera is zoomed in and out?

Hello! On camera zoom in and out, I want to keep a space between the camera and the 3d model, currently when zooming too much I am reaching inside the model and passing by it, Same for zoom out the model is getting too small and disappearing, what is required is to let the user zoom the camera in and out to a certain position

Thanks

gabrielazwaat avatar Sep 09 '22 07:09 gabrielazwaat

what is required is to let the user zoom the camera in and out to a certain position

I think it is currently only possible to extend the SceneView class and override the cameraManipulator property to set the minimum zoom distance. However, I'm not sure if it is available for modes other than MAP. https://github.com/SceneView/sceneview-android/blob/b7341cced9c0d7ac036d3a039a5c5fa9a8d39c1a/sceneview/src/main/java/io/github/sceneview/SceneView.kt#L354 https://github.com/google/filament/blob/eaa86060e2039c3da4031ec71ff9dfea7a4efd72/android/filament-utils-android/src/main/java/com/google/android/filament/utils/Manipulator.java#L193

grassydragon avatar Sep 09 '22 08:09 grassydragon

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 09 '22 05:12 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

github-actions[bot] avatar Dec 17 '22 05:12 github-actions[bot]