Aller au contenu

Pathfinding and stairs.


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

#1
Guest_dewkl_*

Guest_dewkl_*
  • Guests
I have this problem when using the TVI models to create stairs. The player will sometimes get stuck at the last step. If you move diagonally, he will immediately get unstuck and be able to move. I also noticed that if you have crippled movement speed (~0.20) there's no way he can get up. I'm guessing I'm not the only one with this problem. I've tried to adjust the height as good as I can, but I just can't fix it. 

example: http://img571.images...pathfinding.gif

As you can see, the pathfinding doesn't show any problems. Is it possible to edit the pathfinding?

#2
Proleric

Proleric
  • Members
  • 2 362 messages
As you already found, this is very sensitive to the exact position of the steps.

Looking at your screenshot, I'd try moving the steps towards the floor tile with an XY adjustment rather than Z, because it looks as though the pathfinding points at the junction are slightly too far apart horizontally. 

You might have to tweak all three coordinates.

Examine the level from below, too - sometimes there are pathfinding points that you can't see from above, which the engine may be struggling with.

#3
mikemike37

mikemike37
  • Members
  • 669 messages
if you havent already discovered it theres a button in the toolset level editor to visualise collision objects, which may be helpful to you.



if you get *really* stuck and have access to a modelling package you can always try making a new invisible model with walkable collision and placing it over your steps. you will most likely end up with characters floating ever so slightly since youll need to position it above the steps.

#4
Guest_dewkl_*

Guest_dewkl_*
  • Guests
When looking at the collision objects, it seems that the issue is with the staircase and not the adjacent tiles colliding/clipping. I've partly solved it by adding a prp_woodplank01_0 at the last stair, but I can't find a way to make this model invisible (and still use the collision of it).

Setting "visible" to false just hides it in the editor while it will still be visible ingame.

edit: forgot. I tried using an invisible model (as mike recommended) but the lightmap compiler fails to compile because of it.

Modifié par dewkl, 14 mai 2010 - 02:05 .


#5
DarthParametric

DarthParametric
  • Members
  • 1 414 messages
After generating collision, just turn off the option export to game.

#6
Proleric

Proleric
  • Members
  • 2 362 messages
If using a prop is easier for you, fine. For what it's worth, I can confirm that I have several stair models working reliably now. The TVI and FHI models seem to need fine-tuning on xyz. FTI generally works first time.

#7
mikemike37

mikemike37
  • Members
  • 669 messages
hang on, I'll add my invisibile walkable tiles to my invisible boxes project...

...done. http://social.biowar...ect/2472/#files

Add them to your override. You will also need to distribute them to any who use your mod. theres a 1mx1m tile and a 3mx3m tile. You can find them under your models in the level editor under b21/prpi/

I suggest using the snap-to-grid to position them into the shape you need, then disabling the snap-rotate and snap-position and position them as one long "plank".

hope that helps. (you will get a "no meta data found" warning, just ignore it)

Modifié par mikemike37, 14 mai 2010 - 09:51 .