Player can "scale" a static mesh (walk stright up it)
by Nicolai Dutka · in Torque Game Engine Advanced · 07/24/2008 (10:35 am) · 6 replies
I have a plain box mesh with the bottom 4 verts scaled out just a little bit to make a barrier type cement wall. The angle has to be like 85 degrees or so but under 90. If I push the player against it, he can walk right up the wall. Nice barrier....
It should be noted that I have applied the following resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5474
It should be noted that I have applied the following resource:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5474
#2
07/24/2008 (12:19 pm)
Try turning off (I think) canStep in the object properties.
#3
And got no change at all. I thought I remember seeing a line of code somewhere just like that 'canStep' but I can't find it anywhere and can't find any references to anything at all relating to this issue...
07/24/2008 (12:56 pm)
I tried:datablock staticShapeData( wall2 )
{
category = "StaticShape";
shapeFile = "~/data/shapes/destructo/wall2.dts";
emap = true;
canStep = false;
};And got no change at all. I thought I remember seeing a line of code somewhere just like that 'canStep' but I can't find it anywhere and can't find any references to anything at all relating to this issue...
#4
07/24/2008 (1:36 pm)
In TGEA it's allowPlayerStep....
#5
07/24/2008 (2:06 pm)
Does that go in the datablock, or as a dynamic field? I tried both but I am still seeing my character slide right up the wall (slowly).datablock staticShapeData( wall2 )
{
category = "StaticShape";
shapeFile = "~/data/shapes/destructo/wall2.dts";
emap = true;
allowPlayerStep = false;
};
#6
You could probably take a look at the tsStatic and see how it uses that variable and replicate the functionality to StaticShape...
07/24/2008 (3:50 pm)
Actually... my bad... the allowPlayerStep is in the tsStatic class, no the StaticShape class...You could probably take a look at the tsStatic and see how it uses that variable and replicate the functionality to StaticShape...
Torque 3D Owner Nicolai Dutka
When I am up against a vertical section of terrain and push to run up it, I cannot. I set my 'runSurfaceAngle' way down to 10. Now, if I back up and get a running start, the player can get like 4-5 units up the terrain before sliding down. It looks really terrible and can lead to exploits allowing players access to areas I don't want them in. For the most part, it just looks really bad.
Here is a video showing what I mean: http://www.youtube.com/watch?v=OX_2z7JO-kQ