Getting the y-value of my Node at certain position

I'm new to jmonkeyengine… please be good to me… LOL!



My problem is that, i want to get the y-value of my Node at certain position(Like my character's position in the game)



I want something like this



terrain is a TerrainBlock<<<<



terrain.getHeight( mainPlayer.getLocalTranslation() )



TerrainBlock has a method that quickly gets the height at a certain location.



I was hoping there's a method for getting the Node's height as well…



I attached both my TerrainBlock and Box in a Node to think that my player can actually step both on my terrain and in the Box.



I was hoping there could be a workaround for this… Thanks!



float characterMinHeight = terrain.getHeight(
mainPlayer.getLocalTranslation()) +
((BoundingBox) mainPlayer.getWorldBound()).yExtent;

if(!Float.isInfinite(characterMinHeight) &&
!Float.isNaN(characterMinHeight)) {
mainPlayer.getLocalTranslation().y = characterMinHeight;
}


instead of getting the terrain's height in a certain position... I want to get the height of my terrainNode which has a Box...


<script src='http://pastie.org/1013591.js'></script>