Formation with 3rd person player

  • December 30, 2016 at 18:05 #17402
    Elias Lessa

    My game is basically a roman war game, what i’m trying to do is a shield wall formation with the steer for formation row, the problem is that the player is a 3rd person controlled and don’t belong to the group, and i need the group members to form a line with him. Also i can’t put the player as a member of the group because he is controlled by the user with WASD and mouse, not AI.

    Any ideias? sugestions ?

    Thanks, Att. Elias.

    January 2, 2017 at 15:18 #17431

    Since formations in Apex Steer are based around a so called model unit, which is an invisible unit in the group, it only works for units that are in the group.

    You have two options:
    1. You can use the Steer for Formation code as inspiration and create your own implementation that instead has the formation logic use the player character rather than the model unit (look for group.modelUnit in SteerForFormationComponent.cs).

    2. You can create your own Group implementation, basically overriding the DefaultSteeringTransientUnitGroup and the modelUnit property.
    However due to the complexity involved in doing so plus the fact that it will also affect other steering components, I would advice against it.

You must be logged in to reply to this topic.