ue4-rts icon indicating copy to clipboard operation
ue4-rts copied to clipboard

Support for Flying Units

Open HeadClot opened this issue 7 years ago • 2 comments

Support for flying units such as fixed wing aircraft, dragons, etc. would be a welcome addition.

HeadClot avatar Jun 26 '17 06:06 HeadClot

Might be worth making this a component and integrating this issue into #44

Just make it a vehicle movement component.

HeadClot avatar Aug 20 '17 17:08 HeadClot

I think i found a solution. I'm not sure if this is the best way, and if it can "survive" all possible scenarios.

Create a cube or a plane and place it above your level at the height, where the air units should be "flying" For collision you should ignore everything but pawn. Extend your navigation, so it covers that object. Now you can either set a material, so it's 90% opaque, so you can see in editor what's underneath, or set it completely to invisble, if you don't need it any more. Make sure to set it "hidden in game" in any case.

We still need to make some plugin changes to make this work: The first Change needs to be then ARTSPlayerController::TraceObjects, which needs to trace for visibility instead for objects The next thing is URTSSelectableComponent::BeginPlay(), which needs to change the decal size to something appropriate, so the decal can actually hit the ground

Mephiztopheles avatar May 14 '22 20:05 Mephiztopheles