Hello,
I hope someone can point me in the right direction here, I apologise if I have missed something obvious.
So I am building a 2D action RPG, think Zelda ALTTP etc. I have set the horizontal plane to XY everywhere(I can find), specifically in the Game Settings and basically where ever I find it the framework. The player movement works fine, I have created the movement script and animations etc.
However, when I started adding enemies they are moving on the Z axis, they "flip" in the direction of the player and move towards them. When I look in the unity editor in 3D mode I can see the sprite moving through the floor on its "hunt". I have fixed the rotation and the position in the rigidbody 2d component of the prefab but it hasn't made a difference, oh and I have replaced the box colliders/RBs to the 2D variants etc. I'm spawning the enemies using the combatant spawner and a real time battle area.
I have also reviewed the How To on 2D games and made all the changes mentioned there, IE I have gone through all the settings and disabled the Ignore Y Distance settings etc.
I am using the Move AI for the enemy combatants and I am wondering if that's the problem? For 2D games should I be creating my own scripts for the AI? I was really hoping to avoid that and use ORK instead, I am quite new to c# and programming, hence why I bought ORK in the first place.
Any help is greatly appreciated.
This is defined by the Component Type setting - the move AI itself doesn't move your combatant, it only defines the position and speed to move to and forwards that information to whatever movement component you've set up.
The Default component type isn't suited for 2D games, and I don't think that NavMesh is either.
You'll have to either use a custom solution or a 3rd party product, there's e.g. a plugin available to support Poly|Nav 2D.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Best regards.
So I have imported Poly|Nav 2D into my project and then imported the plugin. I have set the Component Type in move AI and in Base Control > Move to interact. I have also created a map and agent according to the Poly Nav documentation. However, I am getting the following error:
Assets/ORK Framework/DLL/Scripts/Movement Components/ORKPolyNav2DWrapper.cs(12,11): error CS0246: The type or namespace name `PolyNavAgent' could not be found. Are you missing `PolyNav' using directive?
I have checked the scripts and the namespace is there, so I'm not sure why ORK cant find it. Poly Nav seems to work fine outside of ORK. Can you help please? I'm probably missing something obvious. Thank you.
I fixed the problem, I was being stupid. I needed to add using PolyNav; to your plugin. All is working as expected now.
You might want to change the plugin to reflect this, in the latest version (v 1.6.5) PolyNav is now in a namespace named PolyNav.
Anyway thanks again for your support.
Best regards.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Well, same questions for you - are you using the move AI and what component/method are you using to actually move the combatants?
I think he used Poly|Nav 2D and ORK's wrapper/plugin.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
add PolyNav Maps、PolyNav Obstacles and PolyNav Agents,I don't know how to control the movement of the NPC in the future. I hope you can recommend some documentation or tutorials.
I don't know how to code, I like to use ork, and I've always thought he'll be more popular than rpgmaker, as long as there's more detailed documentation in 2D.
Alternatively, you can use schematics on your NPCs to move around or Makinom's waypoint path feature.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!