Hi, I would like to create an inventory with rotatable objects in lower center of the screen. I'm using the standard AC inventory menu and created another camera to show objects in front of the main camera. But for some reason the second camera doesn't handle the culling mask that I've set for only those inventory objects. Any ideas?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Are you looking to overlay the second camera on top of the MainCamera, or switch to it like a regular GameCamera?
The MainCamera won't copy the culling mask when it switches to a new camera, but you can enforce that manually by hooking into the OnCameraSwitch event:
FWIW, a 3D inventory is also demonstrated in the Combat Example package on the Downloads page.
I'm trying to overlay. I didn't know about that wombat example. Must check.
I'm having trouble with the wombat example. This happens:
'PlayerInteraction' does not contain a definition for 'IgnoreInputThisFrame'
'InvInstance' does not contain a definition for 'SetInteractionState' and no accessible extension method 'SetInteractionState'
I have the newest versions of Unity and AC.
It doesn't sound like you do. What AC version is displayed at the bottom of the Game Editor window?
Well that was weird. Packet manager in U2020.2.0 claimed that AC was updated to 173.3, but Game editor window 172.4. I update to U2020.3.0 and then Packet manager showed the correct version and I was able to update.
I have an idea of putting inventory objects into an array or matrix formation - and use markers to mark their positions - and then teleport one examined in inventory to a marker positioned in front of the inventory camera. Some of the objects are rotatable and I may wish to have some other variables with the objects - and I wish to set some inventory menu items on/ accordingly. I was hoping the component variables would fulfill my needs but I notice that I can't set any gameobjects to the variables and so no markers. Do you think I should just write a script with variables or maybe event a custom AC script so I could set them all in one actionList command?
Variables of type "GameObject" are now available in the latest release. In what way are you not able to set them?
I would recommend relying on a custom script to handle the positioning though - it should generally be a lot easier, in terms of setting up object initial positions. See the Combat Example for my preferred approach.
If your function is public, you can trigger it via an AC ActionList using either the Object: Send message or Object: Call event Actions.