Creating collisions on the map borders

Hi, im working on a project creating a map, I already have all the physics implemented, as in collissions with the floor and other objects in the scene.
But im having trouble creating collissions with the edge of the map, my character keeps falling right off the edge and I just dont know how to fix it.
Does anyone know of a way that I can fix that.
thanks in advance

I solved this the other day, so what I did is I created a transparent object in blender, port it to blender (using the .blend file to j3o) and make a j3m file and set it to shownormals and then check whatever is there (i don’t remember what it was), then get that model, link it in your model’s scene, and stretch it to make a wall or something.

I consider this the most cheapest solution

cheapest = most expensive in this case, I guess… both in your time and the CPU.

Just create a box collision shape for the edge. Wrap it in a PhysicsRigidBody with no mass. Add it to the physics space.

No spatials were harmed in the making of these invisible walls.


Alternatively, you could implement a NavMesh with pathfinding and restrict all objects movement to the mesh. That allows your objects to move around inside corners where maybe two scenes meet with a realistic looking path vs maybe bouncing off the edge or getting stuck in corners.