Forum rules - please read before posting.

3D Drag Object drawn over GUI

edited August 2015 in Technical Q&A
Hello,

I'm looking at having a Modal inventory system GUI that allows the player to rotate and examine 3D objects that are drawn over the top of a portion of the GUI window. 

The approach I'm taking at the moment has flaws:

1) I have a non-AC Camera in my scene with it's Culling Mask set to only render objects on UI or 3D UI layers.   This camera is childed to my main Adventure Creator player camera. 
2) I have my Inventory Modal UI set up under  AC Game Editor->Menu,  as a "Unity Ui In Scene"   
3) The 3D object I want to allow rotation/examination on is an Adventure Creator Draggable set to "Rotation Only" in the Inspector.  This object is moved to a point in front of the  UI Canvas  (The UI Canvas is set to "Screen Space - Camera" render mode).

Now, if I set the Menu to "Pause Game when enable" in the AC Game Editor,  the GUI can now act as if it were Modal (not allowing interaction with the scene behind the GUI). This is exactly what I want.  HOWEVER, the problem is,  now the 3D object that I am rendering in front of the Canvas is also disabled (as would be expected).   

Is there a way around this?  Perhaps I could just block Input from traversing "through" my Canvas (whats the easiest way to do that)?  Is it possible to tell Adventure Creator to perform its Raycasts (to detect interactions) from a "different" Camera?   Do you have a better approach you can recommend?

Thanks a million in advance! 

Comments

  • A very technical problem, and not one I think I fully understand without seeing any screenshots.  I also don't know why pausing the menu will affect the rendering order.

    However, know that you can assign ActionLists to be run when a specific Menu is turned on and off - it may be that you can use custom Actions (placed within these ActionLists) that perform whatever raycast changes etc need to be made while the menu's enabled.
  • image

    Here's a screenshot of a prototyping scene. As you can see I currently have the UI Camera childed to my main Adventure Creator camera. This is because it is not an AC camera and AC only detects interactions from the active AC camera,  so I need the setup like this allow interactions on the Clock that is being drawn in front of the UI. 

    Now the issue is, I dont want any interactions with objects in the scene, ONLY the clock. I could "Pause Game" over on the right, but that pauses AC completely.  

    Hope I made it a little more clear?

    I have some solutions, one which includes creating a Dummy Collider directly behind the UI Canvas to catch any raycasts that may propagate into the background.  I haven't tested that idea yet.  Was wondering if you had any better ideas? 

    Thanks again :)

  • Just use the Engine: Manage systems to selectively disable any AC system you want - including Interactions.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.