I am having trouble detecting if a ray is hitting a terrain.
I have this but it never returns '1' to say that contact had been made.
Code: Select all
Ray mRay(Ogre::Vector3(x,y,z),Vector3::NEGATIVE_UNIT_Y);
mRaySceneQuery->setRay(mRay);
TerrainGroup::RayResult rayResult=mTerrainGroup->rayIntersects(mRay);
if(rayResult.hit)
{
return 1;
}
Any help would be appreciated.
[Solved]
Bloody GameMaker: Studio wasn't seeing the return result from my DLL.