raycast on collision objects (not bodies)

epha

04-12-2008 02:29:11

Hi,
In my 3d world there are ragdolls which are controlled by physics and (non newton)characters that are moved using ogre functions; I want to raycast and to be able to detect both newton bodies and ogre entities . I think I have 2 options:

1. use OGREs own raycasting which the forums say is cpu expensive and slow. ( I need to be accurate enough to hit the mesh and get a bone from the skeleton corresponding to the hit polygon )

or 2. create collision objects for the entities and destroy them every time I raycast,

both of these seem unsatisfactory, is there a better way ?
( I use mac osx, so I dont think opcode works fro me.)

thanks in advance!

epha

epha

05-12-2008 17:20:50

Well it seems I have to create a whole rag-doll with physics bodies then destroy it; just to do a raycast with ogrenewt/newton ! I only want to do a raycast not move everything every frame by applying forces.

Anyway I checked the Newton forums and it seems that Newton 2.0 has a function to update collision object positions without having to apply forces, and there seems to be OgeNewt for Newton 2.0 . Has anyone used Newton 2.0 with OgreNewt as a pure collision system (no physics ) ? Can you tellme your experience ?

or any other suggestions for doing a raycast to detect non newton bodies.
thanks.

epha

epha

13-12-2008 04:42:30

Can no one even tell me if they have encountered this problem...anyone...?