I have been doing some experimentation with the collision response animators and have a few questions
I have put together a decent size 3DS file that I use to load in a basic town setup, number of different buildings, flat plane underneath to walk on etc. This is mainly a test app to see how the collision system works before I implement it into a custom camera.
I create an FPS camera and all associated pointers etc and then do the following (Most of this was just pulled from the collision tutorial)
mesh = SceneMgr->getMesh("town.3ds")
Node = SceneMgr-> addOctreeSceneNode(Mesh)
this all works fine and I render the town no problems, I then go on to create a octree triangle selector
Selector = SceneMgr->createOctTreeTriangleSelector(Mesh->getMesh(0), Node, 128);
Node->SetTriangleSelector(Selector)
Selector->drop();
Anim = SceneMgr->createCollisionResponseAnimator(Selector, Camera, core::vector3df(12,50,12), core::vector3df(0,100,0), 100.0f, core::vector3df(0,50,0));
Camera->addAnimator(Anim);
Anim->Drop();
All this compiles and runs fine, walls block nicely, etc. However whenever I try to go up a step or even the smallest poly that might be on the ground (aka a 1" tall board), it will not ever go up over this step or board, etc. It is blocked as if there is an entire wall there. This is preventing me from going through doors where there is a sligth stepup, up stairs in buildings, etc.
I can change the gravity, ellipsoid values etc and get no difference. Is there something I am missing with how the response animators work? Otherwise all seems to be working just fine.
Chris Eisnaugle
Collision and Steps
Problem solved
Was able to solve this problem. It was due to trying differetn eye levels but not adjusting the ellipsoid center appropriately.
One other thing that I did noticed and dont' know if anyone has seen this or knows how to solve it.
For the most part movement works fine but there are occaisonal areas where you can get stuck. This primarily happens when sliding along a countertop etc. It happens at the point where joints meet up (aka where two triangles come together). It seems to get stuck and wont slide any further.
The other question I have is there a way to determine what I would call max stepup level. Example I have a fountain outside in my town, the edge is around 2 feet tall, but I cannot step up over this as it is to high. Is there something that lets us define max step up level?
Thanks,
Chris Eisnaugle
One other thing that I did noticed and dont' know if anyone has seen this or knows how to solve it.
For the most part movement works fine but there are occaisonal areas where you can get stuck. This primarily happens when sliding along a countertop etc. It happens at the point where joints meet up (aka where two triangles come together). It seems to get stuck and wont slide any further.
The other question I have is there a way to determine what I would call max stepup level. Example I have a fountain outside in my town, the edge is around 2 feet tall, but I cannot step up over this as it is to high. Is there something that lets us define max step up level?
Thanks,
Chris Eisnaugle
i noticed this too...
basically is has to do with the way the collision response animator works. the thing is, that as a model moves, the animation changes, etc: the bounding box changes shape. now the ideal situation would be for the collision to always be based on whatever shape the bounding box was that second, but the trouble is that its not based on the box, but on an ellipse sort of determined FROM the box (usually), and the allipse is constant, based on the first frame of animation generally. consequently if the model run a jump animation, and it's feet are in the air, theoretically it should be able to jump over something, but unless it's actual position changes, not just it's shape, the ellipse doesnt move to match it, so it doesnt work.
it would be cool to make a kind of collision response animator that worked with the current bounding box directly instead of the ellipse.
however, i'd bet you could hack it by resetting the ellipsoid radius when you changed animation states(or actually maybe every frame....)
prolly would come at a speed penalty...and might just screw up the whole works, but hey, thats what i do
-ted
it would be cool to make a kind of collision response animator that worked with the current bounding box directly instead of the ellipse.
however, i'd bet you could hack it by resetting the ellipsoid radius when you changed animation states(or actually maybe every frame....)
prolly would come at a speed penalty...and might just screw up the whole works, but hey, thats what i do
-ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net