• Advertisement
Sign in to follow this  

Raycasting

This topic is 1238 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can you do the same kind of raycast with bulletphyics etc, D3DXIntersect in d3d9?

Share this post


Link to post
Share on other sites
Advertisement

i cant seem to find an example using a bullet phyics ray on a mesh done in d3d9, do you happen to know any?

Share this post


Link to post
Share on other sites

What is the problem? You have many examples within their sdk.

 

Main part is :

    btCollisionWorld::ClosestRayResultCallback result(from, to);
    physicsWorld->rayTest( from, to, result );
 
... //  use result here

Share this post


Link to post
Share on other sites


a bullet phy[s]ics ray on a mesh done in d3d9

 

I don't know of any examples, and it's probably unlikely there would be one. Most collision/physics engines use objects (such as triangle meshes) that are compatible with the parent API. To use Bullet raycasting with an ID3DXMesh would require creating a separate Bullet object from the ID3DXMesh triangles, or more simply, creating an ID3DXMesh and a Bullet object from a common set of vertices.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement