Game Development Community

Collision bug on trees

by Duion · in Torque 3D Beginner · 12/12/2012 (4:56 pm) · 31 replies

Recently i noticed, that there is a bug in tree collisions, it behaves weird, you can walk up trees or you get stuck, sometimes permanently.

Any ideas what this could be? Collision mesh is properly set up and the bug is with all trees, even the default tree that comes with torque 3d, the default tree is not that bugged, cause it has a very simple collision mesh, but if you run at it against the positive y-axis you walk vertically into the air untill you are on top of the tree.
Page «Previous 1 2
#1
12/12/2012 (6:30 pm)
Uncheck allow player step in the editor. This will disable the 'tree climbing' thing.

Ron
#2
12/12/2012 (7:13 pm)
Thanks. It was a little confusing, cause the tree was in the forest editor and not in a static shape, where you can make this setting.
#3
12/14/2012 (12:19 am)
Yep, I know it's something that will get fixed....I will add it to my list of 'sorta bugs'

Ron
#4
12/14/2012 (6:42 am)
Ah, but the trees are all shapes before they are added to the forest....

And they should not have allow player step enabled by default. Funny, though.
#5
03/24/2013 (9:48 am)
Just discovered some trees where this still works, even "allow player step" is unchecked also reimported the trees as shapes and unchecked again and deleted chached files and loaded again, but still it is there.
#6
03/29/2013 (3:35 pm)
Is anyone working on this or should I commit this as a bug? First the uncheck allow player step seemed to work, but now, maybe since the new version of Torque I cannot disable the tree climb thing. I have no idea where this information is stored, already tried reimporting the dae-files, unchecked player step and reloading the chached filesm, but no result.
#7
03/29/2013 (4:01 pm)
Are you using the stock tree? I'm not seen this in stock MIT 2.0 master with stock tree or my own models. Climbing up objects is based on player datablock RunSurfaceAngle value.

Also if you're getting stuck on something it's generally down to a bad collision mesh. (eg: ending in a point - that can skewer your player)
#8
03/29/2013 (4:53 pm)
It is on every tree and there is nothing changed in the player data, even 90 degrees you can run up. Maybe most people never notice, that you can run up trees, but if you try carefully it works.
#9
03/30/2013 (6:37 am)
If you can run up a 90 degree tree then you can run up a wall.

Doesn't happen on my box, never has since that time in beta when it did.
#10
03/30/2013 (7:27 am)
Here is a picture story:

Setup: default Torque and default tree

Player facing the tree from the y-axis (on the default tree it works only on the y-axis, it is different on every shape, some work better some not):
s14.directupload.net/images/130330/iluv52eo.jpg
Running up:
s7.directupload.net/images/130330/78fs9yxv.jpg
And finally on top of the tree (could be used as a exploit I would also recommend to never use cylinders as collision-mesh on trees, since you always can stand on the top, I prefer to use spikes):

s1.directupload.net/images/130330/iymsw99o.jpg
#11
03/31/2013 (2:25 pm)
Quote:
on the default tree it works only on the y-axis

A-ha! Yep, got it. That is ... odd.

Looking at the collision mesh it appears that the Y-axis is at an edge of the octagonal shape of the mesh - though not sure if that has anything to do with it or not.
#12
04/02/2013 (12:50 pm)
Not new at all. Seen this here in my game since last year. From Torque 3D 1.2 and untill now this has been a issue.

Just cancel any collision with the tree or make bounding boxes should solve this issue.
#13
04/02/2013 (1:56 pm)
Just to point out, on my own custom models I can find that the player attempts the step-up from one angle but fails - unlike in the stock tree. Happens on the edge of hexagon collision mesh like with the stock tree colmesh, doesn't seem to happen on colBox quadragon colmesh.
#14
04/02/2013 (3:07 pm)
I also have some trees where the player can't step up, but this can't be the solution to build every tree so this error does not occur, since some trees need more detailed collision and not a box or no collision at all.

More polygons also help. On the default tree, the edge where you can step up goes from ground to top, if you split it into more, then the player will more likely fail, but also increases polygon count.
#15
04/11/2013 (6:33 am)
i can't find this player step option
#16
04/11/2013 (7:12 am)
In shape properties, under where you can chose collision type.
#17
04/11/2013 (7:55 am)
Hmm you mean in forest editor? (please tell me i don't have to place all my trees manually to use this step option)
#18
04/11/2013 (8:30 am)
Yeah that happens; even if the playerdata is setup that you can't walk on a steep slope like that. Changing stepheight also doesn't change it; you can run op to trees of 10m high -like a Chinese warrior in a Bamboo forest- if you don't fix it...

- make the collision mesh conical, with the wider end on top
- make it high enough to the player can't jump on it
(or make the shape like a bullet so the player glides off)
- use at least 5 sides so the player can run smooth when colliding
- for thin trunks; use a wider mesh, at least 0,30 units (30 cm)
- when using wider mesh, you might want to turn off the decals

Example:
i-dropper.net/torque/TreeCollision.jpg
#19
04/11/2013 (8:40 am)
If you're using trees via the ForestEditor/Painter I'd suggest a straight sided box (eg: colBox-1) - keeps collision simple but not pixel perfect, prevents run/climb up and forests can't have decals on them.

Even on my own custom hexagon colMesh collision (with straight sides) I don't actually get run/climb up, but I do see the step attempt in the player model - it just fails. Always from Y axis only on a leading edge.

Still, annoying.
#20
04/11/2013 (9:38 am)
test
Page «Previous 1 2