Game Development Community

Invisible Wall

by Duion · in Torque 3D Beginner · 03/07/2013 (8:57 am) · 11 replies

I want to prevent the player from moving through areas I do not want him to go, I came up with the idea to make a collsion wall without visible mesh, worked fine, then activated collision and deactivated decals, but projectiles still get blocked or bounce back, but I want projectiles go through and only block the player, is this possible somehow, without much effort?
The other solution would be mission areas, but they are always a square, so they do not always fit and are not a solution for small things.

#1
03/07/2013 (9:24 am)
do a try with physics zone.
with proper value and force direction,u will get almost everything.
#2
03/07/2013 (9:43 am)
If you could restrict movement based on terrain material would that work for your situation?

Konrad Kiss' Layer based traversability for Torque3D terrains may be just the thing.

EDIT: corrected link
#3
03/07/2013 (7:12 pm)
I think that you meant Konrad's Layer based traversability for Torque3D terrains there big fella. ;)
#4
03/07/2013 (7:20 pm)
Heh, so I did. Thanks Steve! Not enough rum in me that early in the day ;)

In a separate discussion I was thinking of both of those and confused one with the other there as well :D

Corrected my post...
#5
03/07/2013 (7:49 pm)
i did not use konrad's resource but i think if u want to restrict player movement
in some specific area of a interior like a house then that resource will not work
as it is working with terrian material only.

is it possible to make that resource working with general materials ?
#6
03/08/2013 (2:51 am)
I tried physical zone, but it is complicated, by changing gravity and force I got some kind of dense pudding, which holds the player back, but not always, if you are steady you manage to dig through the layer another option was to add a strong force against the player, but this was like a strong wind blowing the player away much further than needed and you would have to make it really strong to keep the player from crossing through and other settings even cause the game to crash, so this may work, but not very well.

What I want to do with it is to block player crossing through borders of the map, you can make cliffs, but sometimes you still have things like roads and rivers and it does not look realistic if you make them end on a wall. Another thing where this could be used is a netting wire fence for example, it blocks the player but bullets go through.

And yet another use would be collison meshes, sometimes you need to make rough collision meshes to keep the player from getting stuck, but then projectiles and other stuff gets blocked from pieces of invisible wall on the mesh. For example, you think you can shoot through a gap in a shape but instead it will blow in your face.
#7
03/13/2013 (7:22 am)
Fx Forcefield by Jaime McEntire. When it worked it was absolutely great. However, he didn't keep it updated, and it is beyond my ability to do so. If you can get it working, I think it is exactly what you are looking for.

https://www.garagegames.com/community/forums/viewthread/100499
#8
03/13/2013 (8:13 am)
Put Physical Zone velocity to a negative. I vaguely remember I used to use -1.7 to prevent players walking through back in ye olde past.
#9
03/13/2013 (8:42 am)
A simple and cheap trick would be to model a 2-4 strand wire fence, make it invisible. It would stop anything not small enough to fit between the "wires". A drawback being that the occasional projectile would apparently collide with an invisible something.
#10
03/13/2013 (8:51 am)
Yes, this works pretty good, but I managed to dig in to the zone while trying carefully and constantly, whil I was inside the zone force got applied and it shot my out sidewards at high speed. And if I jumped at it, it threw me back into the ground applied falling damage. :D

It's the best solution so far, with settings of -1.7 and more you no longer cannot go through, but sometimes it pushes you very hard giving damage, but this should players keep of trying thigs.
#11
03/13/2013 (9:21 am)
Another solution is to use the MissionArea (is it working again?) to get the point at which the player exited the mission area, notify the player that he's not allowed here and then teleport him back to the point at which he exited the mission area after a few seconds (or kill him, like Tribes did). Though it sounds like you're happy enough with what you've got.