Hi. I am not good at this but I hope you can understand what I am asking.
I am trying to set up a script that is equipped to my player object(currently this is
the default 3rd person controller) and I have myself a primitive town builtplan to create most of the models in blender and I have it set up so that the player can roam freely around the terrain of the town. What I need though is a way to set up an invisable collision box type thing so that the player cannot go past a certain point.
I am trying to use a simple x1,x2,z1,z2 setup stating that if the player goes past x1 the player is stuck there and can’t go further. This is what I was thinking it should look like say x1 = -85, x2 = 85, z1 = -75, z2 = 75
now if the player goes past x1 they are stuck at -85 on the x axis and so on.
So how can I set this up. keep in mind I am using Java in Unity. I am most comfortable with it.
I’m sure I could use Geometry to do this but I am trying to avoid using geometry as it can look really fake when the player touches the wall.
I hope this makes sense and I hope someone can point me in the right direction.