Turret and Pahtfinding

  • Hi, i cant figure it out how to combine this two.

    i have an sprite with pathfinding and it works great, but if i add the turret behavior to that sprite and add a target. My sprite donst move along the path.

    any help would be great.

    Sorry for my english i hope you understand it .

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Both behaviors are trying to rotate the sprite towards their separate goals (Pathfinding towards the path, Turret towards the target), which causes them to conflict. You can circumvent this by having 2 sprites, one for the turret and one for the pathfinding. Stick the turret sprite to the pathfinding sprite (either with Pin behavior or events), this way the turret can turn towards targets and still move along with the pathfinding.

    You can see an example of this in the RTS template example.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)