I’m working on some kind of feedback for a mouse driven gesture input. I would like to draw a line which represents the mouse movement. The drawing of the line works just fine. But I couldn’t get the drawing in front of the UI which is hold by the canvas in Overlay render mode. Screen space mode kind of solves this, but my former dynamic behavior of positioning is getting distorted.
Is there a reasonable approach to overlay the drawing on the canvas which is in Overlay render mode?
It would be nice to develope such an addition to Vectrosity. But I can’t think of a good start for accomplishing this component. I definetly need some inspiration on how to start out.
edit: But still the Screen Space - Camera mod messed up my current UI Layout behavior. It doesn’t react as aspected when I change the screen size.
Can you provide more details? Preferrably a screencast showing how the behavior is different when using Screen Space - Camera compared to Screen Space - Overlay. They’re supposed to work the same layout-wise (except for the effects of perspective if you’re not using an orthographic camera).
The first image shows the drawing behind the overlay. The second one uses the render mode camera.
I have to reposition the drawing according to the camera’s position and I have to change the layer of the VectorLine’s camera to make it visible.
The problem with the camera render mode is that the sword icon in the middle of that squared pattern won’t hold its relative location if the screen size gets adjusted. The icon is locked to the lower right edge of the squared pattern. After resizing the screen its far off.
Furthermore I need to adjust the position of the drawing manually (pretty much fixed, not dynamic).
Everything works like a charm with the overlay render mode, except the drawing which I want to get on top.
I can’t see anything from these pictures of why that would happen. I suggested a screencast where you show the behavior because that is often much more informative than just pictures. You can use Jing or similar. Make sure to show the Inspector and Hierarchy too in the screencast, and show the anchoring settings of the various objects; especially the problematic ones.