Use UCC character as Rotating Equip/Unequip Model

Rene

Member
Hello

How do I use my UCC character as the model when the inventory screen is open as shown on your demo

the UCC/UIS integration doesn’t show a character model with equip meshes or Unequip meshes

please can you explain how I can add my UCC character model inside my inventory screen?
 
That's a good point, we haven't implemented an easy way to show the character in the inventory menu. There's no documentation about it either.
I have now added that to my todo list. I'll try to get to it as soon as possible.

For now there is now way to do this without code.

If you wish to give it a try right away the idea is to create a a duplicate of your character without all the scripts. Then you would add an Equipper script to it and whenever you open the inventory menu or when your character equips items you sync your menu character with your player character.

If you don't feel comfortable implementing it yourself, don't worry I'll make sure to implement a solution where you can easily set that up, it could take a week or two, I hope that's ok.
 
I use an image and render a camera view on it. Similar to the guides online for HUD camera. Just position your camera to be in front of your character and disable it when inventory is closed. Also, if you dont want your current background to be shown you can position an image game object attached to your character placed behind that also is disabled when inventory is not available.

This method is probably the easiest to setup and will display real time your equipment slots without duplicating characters and setting up new databases.
 
@Ando5000 makes a good point. That's probably the simplest solution. It has quite a few draw backs but you could be a work around until we implement a real solution.

The first obvious drawback is that won't work for first person views. The other is that you won't be able to have custom animations in the UI (think about zelda breath of the wild, when Link react to the whether or eats food in the menu)

That being said in 2 minutes you get something quite convincing:

UCC_UI_Character_04_08_2020.gif


Here are the steps

  1. Create a Render Texture. Right-click the project view -> Create -> Render Texture. Assign it a reasonable size (The size you plan to use in the UI).
  2. In the UI add a Raw Image game object and assign it your Render Texture. This is the image that will show your character.
  3. Create a Camera inside the player Character game object in your scene and rotate it such that it looks at the character
  4. Assign the Render Texture to the camera Target Texture Field
  5. Tweak the Culling Mask, and Clipping planes to show the character and its weapons
I'll get back to you once I implement a more versatile solution for the integration
 
Last edited:
Cool, glad it worked . Thanks for explaining it @Sangemdoko. Your 5th step is a big improvment over a background image lingering on the character to disguise background.
 
Nice trick to get something working quickly, I've added it to my own inventory too... I had to set my cameras `Clear Flags` to 'Solid Color' and the background alpha to 0 before it would render without a black background but it looks really good now.
 
I had taken a break on this task... I have just put in place the steps and it works as expected.

Then I also confirm that it is a good workaround (y)
 
sorry i just got momentarily confused...the solution you are speaking of is listed above..,somehow I thought you were Sangemdoko (not sure why i did that)
 
Top