Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

LW 4.4 East-West Stair Physics Issue


Recommended Posts

When climbing small stairs (only 24 deep x 16 high)running in EAST-WEST direction (if looking in top view)  - EAST/WEST IS IMPORTANT! 

You may often get snagged on a teeny tiny step. Needless to say this is a disaster if you're being chased by a monster/enemy so in my opinion this is a major problem.  Baffled as to why I've not heard it mentioned so maybe I'm doing something silly but seems straightforward to encounter to me.

Maybe someone else can test and see if results vary?

The same steps (copy paste) in a north south direction never seem to snag. Seems to be some physics bug. Affects both meshes and CSG.  I think it may get worse if mesh is more complex, i.e. more triangles per step  and you simply use polymesh for physics mesh calculation.

WORKAROUND: Use alternate CSG ramp (material invisible) or collision mesh with ramp for physics collision. Ramp means there's nothing to bump into but stairs now feel like ramps. 

I can't remember for sure but it may be more obvious if steps are elevated (so you aren't on 0 plane - may be a false assumption).

Test map. Use with default FPS template.

east-west-step-physics-issue.map

https://www.youtube.com/watch?v=u6VeumVppQE&feature=youtu.be
 

 

Link to post
Share on other sites
1 minute ago, cassius said:

yyou could put an invisible ramp over the dteps. I use ramp with steps texture on it, not real steps.

Yeah I mention this in the workaround, but thanks for stating this as I AM interested to know if working around this is wide-spread.: 

Quote

WORKAROUND: Use alternate CSG ramp (material invisible) or collision mesh with ramp for physics collision. Ramp means there's nothing to bump into but stairs now feel like ramps. 

Should we really need to work around it, or is everyone working round something that everyone would hope worked without the need to work around it?

My concern is that for this simplistic situation should the physics (or engine) behave with this variance (north-south vs east-west)?  In this case a bit or geometry running north-south is fine till you turn it west-east.  No problem one way, then BOOM problem.  

A 16 high step is the sort of scenario where I think it would be fair to expect this issue not to occur.  This step size is the officially recommend size so if it has problems best not recommend it.  I think other sizes may have been OK actually. Even if bigger. However, as I think Josh probably concluded when making his recommendations 16x24 generally works out quite well. Particularly if building for modular layouts. 

 

Link to post
Share on other sites

 

Just now, Thirsty Panther said:

Someone had a similar problem ages ago.

Their player was getting caught on a small step. 

Sorry I cant remember the solution. 

I'm on my way to work now so I have a search when I get home.

Out of interest.  would you go the invisible ramp route? sounds like you may have not needed to do this, so maybe you do different game types where it isn't an issue?

 

Link to post
Share on other sites

I agree with you. You should not have too have a work around for basic items such as the stairs that you are using.

Out of interest I changed stairs height to 10cm and the problem persisted. So there is something odd going on.

I couldn't find that other post I was thinking of. From memory he was using a model that had a bevel on the step that was causing the problem. So different to yours.

I went into the FPS controller map and rotated the blocks in there and it didn't replicate the problem ie worked as normal.

I also made my own map with stairs 16cm high and 24cm deep using the FPS player prefab with no problems.

Hopefully Josh will have a look at it.

Link to post
Share on other sites
3 hours ago, Thirsty Panther said:

I agree with you. You should not have too have a work around for basic items such as the stairs that you are using.

Out of interest I changed stairs height to 10cm and the problem persisted. So there is something odd going on.

I couldn't find that other post I was thinking of. From memory he was using a model that had a bevel on the step that was causing the problem. So different to yours.

I went into the FPS controller map and rotated the blocks in there and it didn't replicate the problem ie worked as normal.

I also made my own map with stairs 16cm high and 24cm deep using the FPS player prefab with no problems.

Hopefully Josh will have a look at it.

Interesting....

So just to be clear, you are saying you tried my map and saw the problem in that specific map even with steps 10cm high?

But are you saying you made your own map and didn't see the problem even on steps rotated (or constructed) in east/west direction?

Also if you didn't see it maybe try steps that run east-west but are not at ground (zero) level.  I forget if it was a factor but I remember I first noticed it when I had steps up on a higher level. 

I usually use pivots attached to CSG steps so I can move and rotate all at once.  Could also be a factor if trying to reproduce isn't seeing the same results..

...thanks for looking into it.

 

Link to post
Share on other sites

I remember a similar issue that baffled many a person years ago with a inherent LE2 underground tunnels prop that prevented the player from moving over a very small bump on the floor. The height of it should have not caused the player any issues moving over it. What it turned out to be was that if you zoomed way in to see the profile of this small bump, its face angled in such a way that the player controller was interpreting the face as a slope too great for the controller to climb.I think the fix was to clean up the angle and it seemed to work properly after that. 

Edit - if memory serves there was another issue with one of the underground tunnels props as well where a particular corner of the tunnel prop had alot of geometry all happening in a very small - almost pin size- area. So when a controller would walk over it, it would randomly sligshot the controller all over the room.  Anywho - my suggestion is to check the model especially if you are building your physics shape off of it.  I would suggest keeping the physic shapes as simple as you can.

Link to post
Share on other sites
20 hours ago, mdgunn said:

Interesting....

So just to be clear, you are saying you tried my map and saw the problem in that specific map even with steps 10cm high?

 

Yes Problem still existed.

20 hours ago, mdgunn said:

But are you saying you made your own map and didn't see the problem even on steps rotated (or constructed) in east/west direction?

Yes. No problem.

 

20 hours ago, mdgunn said:

Also if you didn't see it maybe try steps that run east-west but are not at ground (zero) level.  I forget if it was a factor but I remember I first noticed it when I had steps up on a higher level.

Yes. I tried higher and to the extreme left. Still no problem.

 

20 hours ago, mdgunn said:

I usually use pivots attached to CSG steps so I can move and rotate all at once.  Could also be a factor if trying to reproduce isn't seeing the same results..

Used a pivot and attached a series of 10 steps to it. Copied and rotated 90 degrees. Still no problem.

Have you tried to make a new map from scratch?

Are you using the player prefab? With your map the player gets stuck just before the steps start. Its like the players physics cylinder is catching on the step.

Hope this helps.

Link to post
Share on other sites
23 hours ago, macklebee said:

What it turned out to be was that if you zoomed way in to see the profile of this small bump, its face angled in such a way that the player controller was interpreting the face as a slope too great for the controller to climb.I think the fix was to clean up the angle and it seemed to work properly after that. 

 

Thanks for the info.  I had wondered if it was a mesh issue which is why in my example I re-did the steps just as CSG.  Could be that it's still something with how CSG gets converted to mesh, but if it is then that sounds like a bug.  

I'll do a few more tests.

Link to post
Share on other sites
12 hours ago, Thirsty Panther said:

Have you tried to make a new map from scratch?

Are you using the player prefab? With your map the player gets stuck just before the steps start. Its like the players physics cylinder is catching on the step.

Hope this helps.

Pretty sure everything was as close to neutral as possible. I thought that I did the map from scratch in an FPS template but it's possible I moved the problem map into the FPS template I suppose.  The player controller is the default prefab with no modifications to the script.  

I will try again with another FPS template 100% from scratch to makes sure things are a clean as possible.

Link to post
Share on other sites

Problem map is still a problem for me but in a new fresh project I haven't reproduced in recent tests.  I was pretty sure I'd reproduced in 2 different clean projects previously.

As a reminder the unusual elements here are:- 

1. This is happening for CSG steps (though I originally hit the problem with meshes so it may be both)

2. If I rotate the problems steps back to the north south position they seem fine.

Maybe Josh has a way of better understanding what is up with the steps.  

This kinda threw me of my stride for the game competition but I hope to get back into things and plan to build some more maps so I have a chance to run into it again over the next few weeks.

I'll report back if it comes up again.

Cheers guys

Link to post
Share on other sites

Your stairs are 16 high by 24 deep, which is exactly what I recommended.

Let me mess around with it and see.  I am sure I can fix this.  Thank you for the good example.

The next update will take a while to get out and be stable because now we have Leadwerks 4 and 5 compiling from the same source, and I could have easily made some mistakes during that process.  Just warning you.

Link to post
Share on other sites
  • 1 year later...
  • Admin locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...