First, have you given the wall any collision geometry? If not (which seems to be the case), I see two primary solutions:
a) The first, and, I think, better, is to give the wall some collision geometry; how this is done depends, I believe, on how which program you use to make your environment models and how you export to .egg - what do you use?
b) The second, and rather less efficient, I believe, is to just have your viewing polygon collide with visible geometry, although I’m confident that this will incur problem number two, below.
Second, are you sure that Ralph doesn’t have any collision geometry? If he does, you may find that you have an entry for the collision between him and your polygon.
Two final notes (this post seems to deal in twos ^^; ):
While Roaming Ralph does it, I think, I’m pretty sure that you can do without the copying of the contents of the collision queue to a new list - you should be able to just use getEntry, I believe.
You don’t appear to be sorting your entries, meaning that their order is not, to the best of my knowledge, guaranteed. The appropriate call is just <my_queue>.sortEntries(), which sorts from nearest to furthest.
To be honest, I think that this element of Roaming Ralph should perhaps be updated, unless it has already been changed for 1.5.3…
Also, let me point out that you are adding a CollisionPolygon to a traverser as a “from” object, which is not supported. (The collision system would have complained if there had actually been any other polygons for Ralph’s view triangle to collide against.)
As per the manual, the only collision types which work as “from” objects are sphere, ray, segment, and line.
I used 3DsMax and export to “pose” type (from ‘model’,‘anim’,‘both’ and ‘pose’).
I tried the collision sphere instead ,it’s work very well.
Thanks for this helpful note.
And I saw some error like this on console (but the program was not terminate.)
:collide(error): Invalid attempt to detect collision from CollisionPolygon!
This means that a CollisionPolygon object was added to a
CollisionTraverser as if it were a colliding object. However,
no implementation for this kind of object has yet been defined
to collide with other objects.
Like David said. It’s not support ‘From’.
So I will try another colission.