Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Jun 24, 2009 4:52 pm 
Offline

Joined: Wed Jun 25, 2008 2:52 pm
Posts: 35
I'm working on a vehicle sim in which I need to know what surface the vehicle's wheels are touching. After some searching I found the m_groundObject member of the m_rayCastInfo of the btWheelInfo. In the vehicle's rayCast method I see that this pointer is currently being set to a dummy object:
Code:
   wheel.m_raycastInfo.m_groundObject = &s_fixedObject;///@todo for driving on dynamic/movable objects!;
   //wheel.m_raycastInfo.m_groundObject = object;
(Line 189 of btRaycastVehicle.cpp)

in stead of the object returned by the castRay call.

If I comment out the first line and uncomment the second, I can do what I want (check later to see which of my scene's rigid bodies is a pointer to the m_groundObject).

My question is - is this a good idea? Would it be smarter to leave this code as-is and redo the raycast to get a pointer to the object the wheel is touching when I do my checking code? The change doesn't seem to have caused any problems in my particular case.


Top
 Profile  
 
PostPosted: Fri Oct 09, 2009 6:55 pm 
Offline

Joined: Tue Oct 06, 2009 3:19 pm
Posts: 68
I was curious to know this as well.


Top
 Profile  
 
PostPosted: Sun Oct 25, 2009 3:01 am 
Offline

Joined: Sun Oct 25, 2009 2:51 am
Posts: 1
I'm trying to do something similiar. And s_fixedObject is nowhere else changed or used. So I'll change it to the second one in this version, but a note: they added a comment in 2.75:
Code:
wheel.m_raycastInfo.m_groundObject = &s_fixedObject;///@todo for driving on dynamic/movable objects!;
//wheel.m_raycastInfo.m_groundObject = object;

I don't know what is meant, but it's working for me, when I uncomment the second line.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group