Page 1 of 1

Workaround for Bug #806

Posted: 24 Sep 2016, 03:47
by NatalieN
Any idea on how to get "one way walls" to work in OpenMW? I'm trying to come up with a workaround for #806 (https://bugs.openmw.org/issues/806). What I'm looking for is some way that the player can walk through an object one direction, but not the other. I'm trying to make a maze where walls appear behind players when they turn around. The ticket suggests that it can be done with scripting, but I'm drawing a blank on how to do that.

Re: Workaround for Bug #806

Posted: 24 Sep 2016, 04:17
by DestinedToDie
I'm thinking you could place an invisible scripted object to the area after the wall and attach a script that checks if getplayerdistance = certain amount, then add a wall.

Re: Workaround for Bug #806

Posted: 24 Sep 2016, 05:49
by silentthief
NatalieN wrote:Any idea on how to get "one way walls" to work in OpenMW? I'm trying to come up with a workaround for #806 (https://bugs.openmw.org/issues/806). What I'm looking for is some way that the player can walk through an object one direction, but not the other. I'm trying to make a maze where walls appear behind players when they turn around. The ticket suggests that it can be done with scripting, but I'm drawing a blank on how to do that.
IIRC in Morrowind this was the default behavior of the interior cells. I recall being so augmented with levitate and speed that I somehow flew through the wall of the mages guild, and was looking into it from outside (in the void). I have not tried 3D creation for Morrowind in a while, and I only dabbled at it before; so I don't know the answer to this --> isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.

regarding scripting -- if you need to do this with scripting you would want to set up something like a floor trigger (a section of floor that is the same looking as whatever floor that you are using -- but is the trigger for the wall to become enabled or otherwise active. The triggering script for that floor section would have a check run for "getstandingPC" http://www.uesp.net/morrow/editor/mw_cs ... standingpc

then when the Player walks on it -- then trigger the wall. If you need a suggestion on how to set the entire script up -- feel free to ask and I can toss you an example.

ST
PS -- I *still* think that this should not require a script to set up. Just not able to give you a definite. Perhaps one of the users that are more familiar with 3D could answer this...

Re: Workaround for Bug #806

Posted: 24 Sep 2016, 05:57
by DestinedToDie
silentthief wrote:isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.
Read the bug. https://bugs.openmw.org/issues/806

OpenMW collision doesn't work like that at the moment.

Re: Workaround for Bug #806

Posted: 24 Sep 2016, 19:58
by sjek
there's possibly more on the subject in the deapth of this forum (like from many others)
but anyway if memory again serves right the disable enable setdelete was fixed for openmw. disable atleast shouldn,t be needed anymore for setdelete frametiming.

also getlos and forcesneak should work

in other hand it should be bugfree to call disable from wall's script itself
something like

Code: Select all

playersneaking -> getdistance from ash urn (or the wall) 
-> if crossed the unique stand or very narrow looking guard -> enable or disable the wall in question and forcesneak

->experiments? with startcombat
and then on the other hand if that bug is fixed someday, would it be better to handle in openmw-cs leaving both options open. basically someting like internal attributes system for objects which might be easier to handle from gamedata than scripts

Re: Workaround for Bug #806

Posted: 24 Sep 2016, 20:53
by raven
From my understanding bullet collision mesh code uses triangle vertex positions only, can not differentiate between inside and outside. One would have to implement an extra variant (that uses vertex normals?) to handle one sided collisions.

Re: Workaround for Bug #806

Posted: 25 Sep 2016, 19:33
by silentthief
DestinedToDie wrote:
silentthief wrote:isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.
Read the bug. https://bugs.openmw.org/issues/806

OpenMW collision doesn't work like that at the moment.
Makes sense (and yeah, I answered before reading the bug report, sorry). This is difference between gamebryo (original morrowind) 3D engine versus bullet. As complete as openmw is to recreate the Morrowind gameplay, I forget that its not exactly the same.

This may mean that scripting HAS to be the answer.

ST