Code: Select all
wheel.m_raycastInfo.m_groundObject = &s_fixedObject;///@todo for driving on dynamic/movable objects!;
//wheel.m_raycastInfo.m_groundObject = object;
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.