Original Post
I use D3DXIntersect in my first-person game to let the character move up and down according to the terrain. It works very well usually, but if I try to scale my mesh (D3DXMatrixScaling) just before the terrain gets rendered, I can walk around a certain area in the level, but as soon as I pass a particular point, the camera just goes up in the air. I think that I start moving up in the air when I pass the boundaries of the un-scaled terrain. For example, if I start at 0,0 and my un-scaled terrain is from 0,0 to 20,20 , if I scale the terrain by 2, I think the character will start moving up into the air when it reaches 20,20 , rather than 40,40 where I would expect it. So my problem is getting D3DXIntersect to recognise the bit of the terrain that would not be there if it wasn't scaled.