Download

Custom movement component for ship (going around obstacles in sea, RTS game)

Hi everyone. I created ship which can move forward and rotate. It is based on pawn bp class. I am trying to make RTS, so you tap everywhere at the sea and your ship moves here. I made function that calculates needed rotation to target, rotates ship to this target and moves to it. But it can’t go around any obstacles and it can’t find the shortest way to target. Line trace isn’t solution here… So maybe I need nav mesh and ai controller. But (Ai move to) function doesn’t work because there is no movement component inside ship bp. So how could I write movement component for it inside BP? Or maybe there are another ways to solve my problem? Thanks…