- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
- 纳金币
- -1
- 精华
- 11
|
小巧实用的寻径系统,下面是英文介绍:
Greetings to everyone!
Even we had released the pathfinder system some weeks ago, we have recently updated the project.
What does this system do?
Using a very simple and friendly interface, you can tell your game characters to move to a certain position. Then the character will try to reach that position avoiding all obstacles by following the shortest path.
Yeah, but, how it works?
We designed this system so it would be very easy and fast to setup.
First of all you need to drag and drop waypoints around the map and press the Generate Connectionsbutton.
That was the "most complicated" part.
Let's say you want an enemy to reach the player. By using this pathfinder system you just need to write the following sentence:
var nextPosition = GetComponent(Pathfinder).GetPath(player);
// for iOS and Android:
var pathfinder = GetComponent(Pathfinder);
var nextPosition = pathfinder.GetPath(player);
What this does is to return a map position that the enemy has to move to in order to reach the player. There will be no obstacles between this position and the enemy. Once the enemy has reached this position it will automatically update the nextPosition value to a new position. To understand this better, take a look at the youtube videos at the end of this post.
What are those "waypoints" and how to set them?
You can think about waypoints as 360º turn-around security cameras. Those "cameras" can be used by the enemy to know where the player is hiding.
It is really easy to set them up. Just drag and drop waypoint prefabs around the map and press theGenerate Connections button. Take a look at the last video to have a more clear idea of how this is done.
Can I use it with my iOS or Android projects?
Yes, you can. But be aware that mobile devices are not desktop computers, so do not try to place 20 enemies following a target in a very complex map with lots of obstacles. The frame rate would be too low!
And what does this package come with?
By getting this package you will receive an full reference guide and well explained documentation. It also comes with 2 demo scenes. One with a flat floor and the other one with a small ramp where an enemy tries to catch you. It also contains some extra scripts like an improved orbit camera and a simple enemy AI script to show how to move the enemy.
And are there some advanced extra features?
Of course! It is all explained in the documentation manual. You can tell an enemy to ignore certain objects by using layers. You can also connect and disconnect waypoints in real time (what if you blow up a bridge?)
We are working hard to add more features to the system.
Where can I get it?
Take a look at the gameprefabs.com webpage: http://www.gameprefabs.com/products/show/192
====
•
•
•
•
•
Compatible with: Unity 3.x, Unity3 Android, Unity3 iOS, Unity3 Pro, Unity3
This A* Pathfinder system has been designed to be setup really fast, while keeping a decent frame rate during gameplay.
To set it up just follow these simple steps:
•Drag and drop waypoints onto the map and connect them.
•Get the next position your character has to move to achieve it's goal, using one single sentence: GetPath( target ).
What's in this pack?
This pack comes full documented with a Getting Started section where we cover step by step the basic setup of the pathfinder system. You can also find a reference guide for those who want to use some more advanced features like to get the path ignoring some layers.
It also contains two demonstration scenes, all the necessary code to setup the system and some extra scripts that you can use freely in your projects (modified orbit camera controller, player controller relative to the camera and a basic enemy AI)
Information for iOS and Android developers:
We have released the iOS and Android version. Be aware that mobile devices cannot handle massive calculations like other platforms. That means that you shouldn't use too many followers at the same time, or the frame rate will not be enough high.
Simple live Demo:
http://www.gameprefabs.com/products/preview/192 |
|