npruehs / ue4-rts

Real-time strategy plugin and showcase for Unreal Engine 4.
MIT License
747 stars 151 forks source link

Not seeing health bar or selection circle #182

Open sumrex opened 2 years ago

sumrex commented 2 years ago

I am having an issue where I do not see either health bars or selection circles for my units. I have been referencing both documentation and the example project. The example works fine but my own project does not, I see a health bar for a brief moment on launch and then never again, the selection circle never appears. I am not sure if maybe I missed something but I have cross referenced and theoretically have the exact same setup as the example. The example project is working as expected, I can only assume maybe there is an extra step that isn't in the documentation.

This is in the same version of UE5 (p2) for both my project and the example.

Mephiztopheles commented 2 years ago

Does your selection circle have a material set? There is a shipped Circle found in the plugin content. Also make sure, that you have selected the correct player controller which is in charge for the selection.

Also your Inputs could be a problem. Check, if you have copied the inputs from the demo project

sumrex commented 2 years ago

I had a material set and everything.

I did eventually figure it out. The draw size of the circle is based on the collision component of the units. Basically after lots of testing, you need to put capsule collision on the unit, which will determine circle size. This cannot be anything other than capsule from the looks of it.

Mephiztopheles commented 2 years ago

As i look into the code, it should work with every ShapeComponent. So Box, Sphere and Capsule should work

Mephiztopheles commented 2 years ago

Also the Decal only projects on other actors. So if your actor is not on the ground, then you can't see the decal