Home > other >  Unity can be used in 2 d game navmesh pathfinding algorithm automatically
Unity can be used in 2 d game navmesh pathfinding algorithm automatically

Time:09-18

Like with vigour knight that style of 2 d maps

CodePudding user response:

Can, but most use AStar pathfinding, the original poster can understand it

CodePudding user response:

Can be used, but the navmesh have inherent defects, if need dynamic obstacles (DOTA women ravines this obstacle) demand will be very hurt

CodePudding user response:

reference 1st floor leon548534leon response:
can, but most use AStar pathfinding, the original poster can know about the

Thank you, I learned A few days ago A * algorithm, but A very egg pain problems:

Colider2D object, how to determine an area
Or: Physics. 2 d how at one location assumes a rectangle to detect collisions with the surrounding

Specific situation I encountered:

Identify obstacles when baking grid, online general method is to use Physics. The CheckBox to detect - on the assumption that there is a cube is a place with the surrounding collision detection,
OK, but I this is 2 d, early all prefab is set according to the Sprite, and there is no corresponding method Physics2D,
I want to come to a roundabout way is to use ray detection, but the feeling is performance,,,

CodePudding user response:

refer to the second floor wurh80 response:
can be used, but the navmesh are born with defects, if need dynamic obstacles (DOTA old cow gap this obstacle) demand will be very hurt

Indeed, we this game (for college students to,,) is can destroy obstacles,,

CodePudding user response:

reference 1st floor leon548534leon response:
can, but most use AStar pathfinding, the original poster can know about the

Ha ha finally made to the afternoon) Demo
Thanks to some

CodePudding user response:

reference qq_38981285 reply: 3/f
Quote: refer to 1st floor leon548534leon response:

Can, but most use AStar pathfinding, the original poster can know about the

Thank you, I learned A few days ago A * algorithm, but A very egg pain problems:

Colider2D object, how to determine an area
Or: Physics. 2 d how at one location assumes a rectangle to detect collisions with the surrounding

Specific situation I encountered:

Identify obstacles when baking grid, online general method is to use Physics. The CheckBox to detect - on the assumption that there is a cube is a place with the surrounding collision detection,
OK, but I this is 2 d, early all prefab is set according to the Sprite, and there is no corresponding method Physics2D,
I want to come to a roundabout way is to use ray detection, but the feeling is performance,,,


Ray method is no problem, not a whole large map detection, with points area detection, you only need to be concerned with leading role is in the big game in a certain range of area is enough
Give you two screen large area, not very limit very confuse situation is ray detection or calculate
  • Related