Aquatix
27-10-2007 03:27:52
Hi again! Spent quite a bit of time playing with OgreBullet this night. It does indeed seem to be much more interesting that Ode was (thanks again, Tuan!).
As my first contribution, I'd like to make a Character Controller for OgreBullet. What kind of a controller? Well, like we discussed here in OgreOde's forum. I already got an 80% accomplished (in terms of features) model in Ode, so I'm just porting it to OgreBullet.
So, I'd like to ask, if anyone, who has already used OgreBullet for some time (I know, there's really no documentation yet) to give me just a few notes (even the tiniest bits would do) about Rays and how they work here.
Especially the following points:
1) Why is there an Ogre(!) Ray in CollisionRayResultCallback (from OgreBulletCollisionsRay.h). As far as I got what Bullet is doing, then it really only needs a start point (Vector3) and a finish point (i.e. aiming point - another Vetor3). So, what's the point of having extra things here?
2) What info exactly can you get from a Ray's collision? Is it just hasCollided() boolean? Any way to get point of contact (Vector3 coordinate), penetration depth even (well things similar you'd get in ODE from Contact() after doing a Ray->collide(whatever...);
3) And finally, just confirm, if I got it all right - a Ray in Bullet is known as CollisionRayResultCallback. In order to cast it (or collide) you do: World->launchRay(ray_pointer). And then the result you get by accessing CollisionRayResultCallback->hasCollided() for instance.
Would be really great if someone could answer that, so I don't have to study all the source, heh . Thanks in advance!
As my first contribution, I'd like to make a Character Controller for OgreBullet. What kind of a controller? Well, like we discussed here in OgreOde's forum. I already got an 80% accomplished (in terms of features) model in Ode, so I'm just porting it to OgreBullet.
So, I'd like to ask, if anyone, who has already used OgreBullet for some time (I know, there's really no documentation yet) to give me just a few notes (even the tiniest bits would do) about Rays and how they work here.
Especially the following points:
1) Why is there an Ogre(!) Ray in CollisionRayResultCallback (from OgreBulletCollisionsRay.h). As far as I got what Bullet is doing, then it really only needs a start point (Vector3) and a finish point (i.e. aiming point - another Vetor3). So, what's the point of having extra things here?
2) What info exactly can you get from a Ray's collision? Is it just hasCollided() boolean? Any way to get point of contact (Vector3 coordinate), penetration depth even (well things similar you'd get in ODE from Contact() after doing a Ray->collide(whatever...);
3) And finally, just confirm, if I got it all right - a Ray in Bullet is known as CollisionRayResultCallback. In order to cast it (or collide) you do: World->launchRay(ray_pointer). And then the result you get by accessing CollisionRayResultCallback->hasCollided() for instance.
Would be really great if someone could answer that, so I don't have to study all the source, heh . Thanks in advance!