Jump to content

Help request: player under AI control cannot go up stairs


Recommended Posts

Hello boys and girls,

 

I am having a strange problem with a cell and a scene I am developing.

 

The scene has a NPC and the player (or another NPC).

At the begin of the scene the player is under AI control (from zbfBondageShell).

 

The player do its packages, like following the other NPC.

 

But when he/she come to a stair it get stuck trying to climb it.

 

The other NPC has zero problem going up the stair.

 

If in the scene I replace the player with another NPC everything works great.

 

Do you know if there are special controls/cheats/IKs to be done to let the player to go up a star (correctly navmeshed)?

 

 

Thank you

 

 

Link to comment

I think sometimes it is caused by the area not being navemeshed. I know sometimes people make homes and stuff and don't add it to some things you can go through the doors but followers get stuck and they can get stuck in other spots as well if the areas are lacking navemeshes. 

Link to comment

To , I did a "teleport" in case the actor is the player and the raping the stairs takes more than 3 seconds. Just a workaround but it is fine enugh.

To @myuhinny, the navmesh is almost perfect. Works as intended with NPCs, works for the player EXCEPT when the AI from zbfBondageSchell is used. If I stop the AI of the player on my own it is fine. (But then I have different problems, I am NOT going to re-write Zaz Animation Framework...)

 

Link to comment

Hi, thanks for this post. But it actually does not apply. My 2nd floor is at position 256, and NPC have no problems going upstairs by the sandbox or by packages.

 

The problem is only the player, and only when the function restrainAI() of the ZAZ Anim Frmwk is used.

When I am using my custom AI restrain function (that does more or less the same), the player can go up without problems.

 

Navmesh seems to be ok.

Packages are ok.

Finding area is ok.

 

Thanks again, I used a trick to solve this problem. And I think the problem is in a specific way the IK is managed when a NIF has the collision specified in a specific way.

 

Link to comment

Player under Ai control + stairs = glitch.
NPC + Stairs = can glitch but should work.

 

Make sure the NavMesh is not sunken into the stairs, that you created a prefered path and that the NavMesh has not to many trianlgles (for a straight stair it's usually 2 trianlges, everything else is simply to much/not needed). And last but not least: Draw the NavMesh not to close to the sides of the stairs - cover only the steps and no parts of the railing and verify your NavMesh to see if everything is properly connected (sometimes vertexes are not connected, especially if you just try to get things done, but instead you placed another vertex on the same place of an existing one).

 

Link to comment

Hi @GCI, navmesh is not intersecting the stairs (it is just above), has just two triangles (to cover the starts, total navmesh has 447 triangles).

It is a preferred path.

Triple checked the navmesh for Island and isolated vertex or edges. None there.

Also tried to have the navmesh smaller that the width of the stairs or bigger or exactly the same size. No variations.

NPCs go over with ease, the player under AI control does not.

 

Don't worry, I implemented a bypass with a quick teleport from the bottom to the top. At the end the player is AI controlled, so it does not bother too much.

 

Link to comment

Your initial post made it sound like you have trouble with NPCs using the stairs, which is unlikely by what you wrote. So i'm glad i understood this wrong.
But that the Ai-driven player has problems is well known and unless you redo the stairs mesh and it's clipping box (it's what i read causes the problem; i know next to nothing about 3d modeling), you'll have to use the teleport trick.

So GlitcheGumee and i recommend that you check out Prison Overhaul and/or Maria Eden, if you want to see it in action and some code on how to approach this problem.

 

There are ofc other solutions, but all that don't rely on teleporting and/or giving limited control back to the player (my prefered method), are simply to heavy on the system load, for what they try to accomplish. Definitly not worth the time, the effort and the needed resources, imo.

Link to comment
  • 3 weeks later...

I realized it with limited player control : I give back the control every 2 seconds (or if the player touches his game  controller or the PC reaches the leash distance) for 2 seconds and remove control if the distance to the leader exceeds the leash distance. It looks and feels smooth now and works pretty well for obstacles.

 

Another possibility is kickass scripting - I use this for leashed NPCs: I move a marker to the NPC and measure the distance after 2 seconds - if the distance to the NPC is to small (NPC is stuck) I teleport the NPC for a short distance in leader direction.

Link to comment

PS: For player leash there is a bit more work to do - I track cell changes and teleport the player if the leader changes into a cell that is not directly connected (passing a door) - and if the distance to the leader gets much too large I teleport the player right behind the leader as a fallback solution.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...