Closed DearVa closed 2 years ago
This happens when a Polyhedron is not convex...
Hey, I found a SIGGRAPH paper that could convert a non-convex polyhedron into convex polthedrons. Maybe this can also solve the problem caused by Displacement?
The reorientation of player's camera when go through a portal is faster just like in Portal 2. And you can adjust it by changing "cl_reorient_rate" and "cl_reorient_acceleration_rate" in console (Default value in Portal 1 is 120 and 400).
Thanks for contributing!
Though... It's not grace enough. This bug is caused by non-convex polyhedron but I add lots of checks to make it not crashing. Please forgive my ugly code. If I can solve it, I may revert these changes. By the way, I'm now working on improving the Path-finding algorithm to enable NPC go through portals. Now physics-based NPC like manhack or cscanner works well but non-physics-based can be teleported to unexpected location.
If a NPC can't reach it's destination, it will try to go through portals. If go through a portal is a shorter route, it will also go through it.
Nah it's fine, game not crashing at random places is already a huge improvement even if you can't place portals there, there aren't that many places crashes happen anyway. And any help is appreciated anyway.
Yeah, pathfinding that accounts for portals sounds pretty cool, I'd be really glad if you could help me with that.
Hey, I found a SIGGRAPH paper that could convert a non-convex polyhedron into convex polthedrons. Maybe this can also solve the problem caused by Displacement?
Thanks I'll check this out
Hmm, at what places does it fix the crashing though?
d1_trainstation_03
Ok I see, didn't even know about this bug, I thought this was a fix for another bug: if you place portal on the floor in the red barn on d1_canals_06 the physics engine will crash. But your fix is also nice to have.
Ok I see, didn't even know about this bug, I thought this was a fix for another bug: if you place portal on the floor in the red barn on d1_canals_06 the physics engine will crash. But your fix is also nice to have.
Did you mean this barn?
Yeah. but you need to climb up the ladder first so everything in the barn spawns in
crashed : (
Place the portal on someplace will crash the game. It is because that CPortalSimulator::CreateLocalCollision fails on ConvertPolyhedronsToCollideable and returns NULL. I've made a check and if it fails, the portal will not be placed on the new place.