Hi, if anyone has successfully done a first person real time battle in Ork with the enemy following you from a little distance during battle, please message me. I need help. Thanks. The tutorials do not cover this.
  • I haven't done this, but I can tell you that you'll need to add some pathfinding. The ORK tutorials mostly just use the simple Character Controller for movement, which doesn't do any sort of pathfinding at all.

    You'll either need to set up all of your AI controlled characters to use the built-in Navigation API (bake a NavMesh and use a NavMesh Agent on each character) or look into a third party pathfinding solution.

    Start with Unity's NavMesh until such time as you need more than it provides.
  • Thank you. Do you know how I incorporate the NavMesh pathfinding with the Ork attack events? I am only used to working within Ork, I don't know how I would link something I do in Unity, with Ork's battle system.
  • Okay, first thing to do is read the section of the Unity manual on Navigation and Pathfinding. This will instruct you on how to set up your environment in order to bake a NavMesh.

    Now, to get it working with ORK combatants, you need to modify the settings of your Move AIs:

    image

    You can have it automatically add the NavMeshAgent component when the combatants are spawned, but I suggest adding to your prefabs manually, as you will probably want to change some of the settings on it (the offset if the character appears to float above the ground, and the angular velocity for turning probably needs to be increased significantly). Just keep experimenting with the values until you get something that looks good.

    To use the NavMesh pathfinding in ORK events, there is the Movement -> Change Nav Mesh Target event step. When you call this, you can have it set the navigation target as either a Vector3 position or to the position of another object. In this example, I set it so that the attack sets his target as a destination. You'll see that I set a Local Offset of 1 unit on the Z axis. Typically, the Z axis positive direction (in local space) extends from the front of the model outwards. So this will direct the attacker to navigate to 1m in front of the target.

    If you need to check the status of the NavMeshAgent, you'll need to use Check Fields and Check Function event steps, using the component name NavMeshAgent and specifying the fields or functions on the NavMeshAgent that you want to access (the fields are listed in the API documentation).

    Yes, this is simpler to use than the alternative pathfinding packages.
  • Thank you so much Keldryn. Wow. You know what you are doing. I don't really know the terms , I don't know what a NavMeshAgent is, or what main Ork event I would add "Change nav mesh target" to. Are the vector 3 and offset options listed in the event's properties below the bubble chart? The graphics of the event? Where do I find out what a NavMeshAgent is? or what event to use Change Nav mesh target on? please. What does it mean to check the status of the NavMeshAgent. Should I just read the unity documentation? link you gave? But that won't cover how to use the "Change nav mesh agent" on any given event. or what event to add it to and when.

    Sorry about the ignorance. Please let me know any more if you can and thank you for that long explanation!!! because once I know what you are talking about , I will be a able to do it. Basically the above questions are all I need to be able to do what you are saying to do. Thanks for taking the time for all of that.
  • edited April 2016
    Ok I read the navmesh tutorial. I just baked a navMesh for the entire terrain. I can see "holes" in it where the enemy has to walk around. like trees or my portal. Is a navMesh for the entire terrain good? I was unable to make a path for the bear to run on. It only lets me select the entire terrain, but it is all blue and looks to be in working order. Ok..set the type in Hunt move AI to Nav Mesh Agent. not sure what to do now.
    I just added manually the nav mesh agent component. Did nothing else. now going to see what happens when I play the game. lol. probably nothing. nothing in events yet.

    lol. the bears don't play their walk animation anymore, and they slide all over the terrain. they go very very far away now. sometimes. For the battle, once I attack one, no other bear will attack me. The bear I am attacking does not face me, and he keeps biting at the air once I am far gone. But at least they are on the mesh and it is working. What should I do now? please.

    oh man if I can get this working....it will be like my 1st birthday party. lol
    Post edited by silverglade1 on
  • The NavMesh simply defines where agents are able to move. It's essentially a very low-poly surface that approximates your level geometry and is thus MUCH higher performance than continuously raycasting the more complex geometry.

    So yes, you want it to cover your whole terrain. You don't use it to set paths for specific agents. All NavMesh agents use the same NavMesh. You can assign different costs to areas so that agents will try to avoid walking through those areas unless the alternative is a REALLY long way around (or blocked).

    If your bear isn't animating, go into the bear cimvatant's Animation and Movement settings (the last section) and make sure Use Position Change is checked.

    As for how the bear behaves when it's attacking the player... Well, you're going to have to create the behaviour you want through the Battle AI and relevant battle events. I haven't done much with real time combat, so I have little more advice to offer on that part.
  • ok thanks. Do you know what event this goes in?

    Movement -> Change Nav Mesh Target event step.
  • Not for real-time combat. I'm not sure if the Move AI is enough to handle advancing towards targets or if you need to set that in a battle event.
  • ok thank you
  • Thanks very much! the bears walk now with animations. But they don't attack. I probably will have to make up a new attack event or something. not sure. I will wait until GameIsLove gets back I guess. Which is tomorrow I think.
  • or gaming is love
  • edited April 2016
    Does anyone know of a unity asset package at the unity store that enables me to have a live map of my terrain with my player location on it as a moving dot, and lets me put another dot for the teleport location in the zone so they know how to get out of the zone? My zones/scenes are getting pretty large. Please. Any help greatly appreciated.
    Post edited by silverglade1 on
  • You mean a minimap? In ORK natively you can do an Elder Scrolls style nav bar, but if you want a visual map maybe check out UGUI MiniMap, DMMap or RPG Minimap.
    My little chunk of the internet: http://artemic.com
  • Great! thank you
  • Attacking should probably work much the same as with the real time battles in the tutorials.
Sign In or Register to comment.