Blender "trackball" orbit method for arcRotateCamera

Hi :slight_smile:

Is it possible to have the same comportment as “trackball” orbit method in Blender with an arc rotate camera ?
The default comportment is more like the “turntable” one, wich always make a world UP axis rotation, where the “trackball” seems to rotate around the transformed UP axis of the camera

I tried to change updateUpVectorFromRotation but doesn’t seems to be that

Thank you !!

can you provide a PG that tries to do what you describe?

Not really, but I can show you it in action in blender:
Here’s the “Turntable” orbit method (like in babylon)
Turntable
And here’s the “Trackball” method:
Trackball

I’m not sure if it’s clear enought…

This is what happens when I’m draging my mouse cursor horizontally on the canvas:

  • In green: it’s ok, the camera is almost on the same Y axis of the mesh, we turn around the target
  • In red: the camera is on top of the target, the result looks like a rotation of the mesh
  • In blue: it’s what I try to make: continuing to turn around the target whatever the angle of the camera

Sorry it’s complicated for me to explain… Hope it’s not even more confusing…

I think I understand what you want. there 2 rotation axis : X and Y and they are in camera space, not world space like arcRotateCamera.
I think this is doable with a camera and a parent transform. and when getting mouse pointer move event, rotate the parent transform with rotate Function.

2 Likes

Absolutely, that’s what I had in mind, here is a Playground testing this idea :slight_smile:

++
Tricotou

3 Likes

Yes this is it, modified a little bit here
Thank you a lot for your help ! :partying_face:

1 Like

Link is not working. 404

I believe it should be #60

1 Like