Game Development Community

Invisible walls

by Joshua david groves · in Torque 3D Beginner · 02/20/2014 (10:07 pm) · 18 replies

How can i Implement invisible walls...

#1
02/20/2014 (10:30 pm)
One of many tricks is to use the MeshRoad object and give it a fully transparent material. Make it high enough to avoid stepOn and make it thick enough so that players don't get stuck due to bad collision.
#2
02/21/2014 (3:34 am)
I also wanted to make an invisible wall to block the player, I used a mesh without material for it, but the problem is, the invisible wall blocks projectiles also, which is very unrealistic.
#3
02/21/2014 (3:37 am)
What kind of invisible wall? Is it just for restricting movement on terrain? Then check out Konrad Kiss' terrain-layer based traversability resource.
#4
02/21/2014 (5:42 am)
If i add collision to my models the Collision system Freaks out and frame rate drops rapidly
#5
02/21/2014 (7:28 am)
Use the convex shape draw tool and check off the box that says isRenderEnabled. That's how I do invisible walls. You'll still be blocking projectiles, but I think with a few source code edits you could get by that.
#6
02/21/2014 (7:49 am)
I make invisible walls that I call collision_Mimics all of the time to compensate for any animated object losing their collision such as a treasure chests that opens and close. What you do is make clear texture, save it as detailClear or something like that. Apply the clear texture to any model in Blender and export it.
You may want to give the wall a normal texture first, to make sure it exports correctly, or you may want to give the bottom of the wall (normally sunk in the ground a bit so it is not normally seen) a texture so that you can still see something if you ever have to move it manually in the game editor
#7
02/21/2014 (7:53 am)
In "ye olde dayes" a broken collision mesh (not fully sealed, leave a hole at the back) would prevent players from moving into it but let projectiles through. I discovered this entirely by accident.

You could also use the physical zone to create a gravity or force or whatever it's called barrier. If I remember correctly the setting -1.4 usually stopped players without affecting projectiles.
#8
02/21/2014 (8:32 am)
Thanks for the advice
#9
02/21/2014 (1:46 pm)
Check out the road mesh in action here:

Road Mesh as Terrain Border
#10
02/21/2014 (8:42 pm)
I Prefer the Convex shape way of doing it. Is there a way to put Like a green box around the collider thats visible in the editor only
#11
02/21/2014 (8:43 pm)
Like this for a example... https://www.google.com.au/search?q=Unity+collider&client=firefox-a&hs=7jQ&rls=org.mozilla:en-US:official&channel=fflb&source=lnms&tbm=isch&sa=X&ei=pCoIU6uRFsGMkAWX-YCYBA&ved=0CAoQ_AUoAg&biw=1440&bih=768&dpr=1#facrc=_&imgdii=_&imgrc=2jjrN8DZnwNv1M%253A%3BE8qlWvkO5eurdM%3Bhttp%253A%252F%252Fi54.tinypic.com%252Fmvnvqp.png%3Bhttp%253A%252F%252Fforum.unity3d.com%252Fthreads%252F69735-Collider-Bounds-Center-Conundrum%3B233%3B194
#12
02/22/2014 (8:10 pm)
I tried physical zone but it pushes you back when you go onto the physical zone
#13
02/22/2014 (11:10 pm)
A million ways to skin the cat...

As yet another alternative, why not use the "Mission Area" object, the player already has hooks for entering/leaving mission area ... and you can have it push them back or whatever you like.

Not sure if that would work for your goal(s), but its simple to implement.
#14
02/23/2014 (1:28 am)
Hmm Perhaps if they leave the physical zone theres a timer that Starts Like battlefield and you die if you dont go back
#15
02/23/2014 (1:40 am)
How would i implement that
#16
02/23/2014 (6:55 am)
Quote:Hmm Perhaps if they leave the physical zone theres a timer that Starts Like battlefield and you die if you dont go back
Quote:How would i implement that
Sort of like the Mission Area Out-of-bounds Damage and/or Warning Resource.
#17
02/23/2014 (7:55 am)
thanks
#18
02/23/2014 (9:08 am)
I am using modified versions of the vehicleBlocker to block players or AI.