Aller au contenu

Photo

Pathfinding through objects


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Nwalya42

Nwalya42
  • Members
  • 306 messages
I was wondering if there was any way to make pathfinding ignore an object? I have a tevinter wall with an archway, and I want people to be able to walk under the archway, but the pathfinding always goes on the top of the wall. (Archway model is tve_bridge_04_0)

Thanks in advance.

#2
Hammer Fang

Hammer Fang
  • Members
  • 78 messages
from what I understand, pathfinding cast rays straight down, so you can't make paths that go 'under things', like archways. I believe that you can manually walk your character under the archway, but the AI will path find a way around the overhanging area if possible. in other words, if your controlling a character, you can make them walk under the archways, but the rest of your party who is AI controlled will not be able to follow you. I haven't actually tested this yet ....

#3
Nwalya42

Nwalya42
  • Members
  • 306 messages
Interesting. I understood that the rays went straight down, so i was hoping I could make pathfinding ignore the archway model and cast the rays on the terrain, and use terrain collision to prevent the character walking through walls.

I also think that the pathfinding applies to all characters - not just the AI. I think the pathfinding is the way the game says "You can walk here".

#4
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
Is there a way to make the archway not collideable at all? Because you could place it, then use the pathfinder helper to make a fence around the parts that you don't want to walk though.


#5
Nwalya42

Nwalya42
  • Members
  • 306 messages
Thats the main question really - how to make a model uncollidable?

#6
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
delete its collision geometry would be one way.

#7
Nwalya42

Nwalya42
  • Members
  • 306 messages
Huh. Care to enlighten me on how to do that? I pressume you would have to create a new copy of the model, delete the collision geometry for it, then add it in. How do you a) Do this? B) Make sure it shows up in the builder to player package? and c) Not screw up everything else?

#8
Nwalya42

Nwalya42
  • Members
  • 306 messages
Huh - turns out Hammer Fang is right - pathfinding affects the AI. I just loaded the level and ran through the archway with no problems, but my companions got stuck on the other side.

#9
Nwalya42

Nwalya42
  • Members
  • 306 messages
Decided I would modify my level a bit - now the archway will be used for an area transition, so I don't need to worry about pathfinding.

#10
Hammer Fang

Hammer Fang
  • Members
  • 78 messages
I found a way to pathfind under the archway. move the archway to the scratch pad, without moving it's actual location, check in the properties 'is visible' to false, then do your path finding. Move the gate, back to the world, (once again, not actually moving it's location!), make it visible, and export your level. The toolset wont even complain.



gg