cesium-unreal icon indicating copy to clipboard operation
cesium-unreal copied to clipboard

Mouse-Based Player Controls

Open argallegos opened this issue 4 years ago • 15 comments

We've previously discussed a CesiumJS-like camera for Unreal Engine (https://github.com/CesiumGS/cesium-unreal/issues/11), and the new Dynamic Pawn addresses many of the big camera control issues with the plugin. However, there is still a distinct need for mouse-based scene navigation. Keyboard-based controls like the current Dynamic Pawn may be intuitive for gamers, but may be less convenient for other demographics. This has been brought up in several forum posts (1, 2, 3(ish))

In particular, the features from CesiumJS that I think are worth adding to Unreal are:

  • Left-click and drag to pan/spin the world (Or rotate around the world)
  • Middle-click and drag to rotate the camera relative to the ellipsoid
  • Scroll to zoom in and out
  • Lock the camera near the poles to control glitching
  • By default, have the North Pole facing the top of the screen and the South Pole facing the bottom of the screen. Users can rotate this but only by explicitly using the control (Middle click)

Gif from CesiumJS showing the type of motion we will want in Unreal: CesiumJSCameralow

The Dynamic Pawn inherently is less suited for viewing earth from space, as is the Unreal editor camera. It's almost impossible to change the area of the globe you are looking down on while remaining at a consistent height. The Dynamic pawn allows users to have a lot of freedom of movement, but there are definitely use cases when we want the camera to be constrained.

This kind of controller should also not lock the mouse unless the user was actively clicking and dragging, which would allow for improved interaction with UI elements, and features like polygon selection, etc once we get around to those.

I recommend this controller be implemented as a pawn that can be used as an separate alternative to Dynamic Pawn. Users could select the pawn that was right for the experience they were trying to create, or even switch between them during play if needed.

Please add any other suggestions for what this other control system might need, or possible ideas for implementing it.

argallegos avatar Jun 29 '21 20:06 argallegos

Another thing I would like to add is that:

  • we shouldn't constraint the camera on the north or south pole like CesiumJS does. At least google earth allows the camera flies over it
  • when zooming out from the space far enough, the earth should be re-center the screen again. On the CesiumJS, if you view the ground and zooming far away, the earth will be in an awkward position

baothientran avatar Jun 29 '21 21:06 baothientran

CC #325 BTW how did you record that video @argallegos? It looks like maybe you've implemented a bit of it already?

kring avatar Jun 30 '21 00:06 kring

@kring Oops, I should have labeled that image - that's a gif from CesiumJS to show the motion I was describing. I'll update to make that clear.

argallegos avatar Jun 30 '21 12:06 argallegos

Oh right, of course. For some reason I looked at the ion logo and "Data Attribution" link and said "wow that looks like Cesium for Unreal," even though clearly it's not. 😆

kring avatar Jun 30 '21 12:06 kring

Any news about this?

oria66 avatar Mar 22 '22 20:03 oria66

Any news about this?

https://github.com/orgs/CesiumGS/projects/1#card-64071615

It's in their backlog, no one is currently working on it.

Renari avatar Mar 24 '22 18:03 Renari

Looking forward to it

chase03 avatar Feb 25 '23 14:02 chase03

我他妈的很期待 因为我做这个功能2个星期了 但是仍然有很大的问题

LeopoldFize avatar Jan 19 '24 03:01 LeopoldFize

@kring

LeopoldFize avatar Jan 19 '24 03:01 LeopoldFize

Looking forward to it

yoyomule avatar Jan 25 '24 00:01 yoyomule

Looking forward to it too,Please!

263460976 avatar Apr 08 '24 14:04 263460976