if you run on Broomstick, Elevation has been merged with some of the methods of 3.x ElevationReader. So that you run 3.x or 4.x, you can ask the y if you pass the right coordinates, and eventually a ratio.
a tutorial is available for previous version. 4.0 is slightly different, but concept is similar. http://away3d.com/tutorials/tutorial-surface-tracking-elevationreader this technic is very gentle on the cpu if you are comfortable with more complex or want to read "any" surface, you have to use Ray class, and eventually the BarycentricTest class if you would want to modify the texture. For instance add trails, impacts etc... climbing stairs, can be done on different ways: here are few principles: using 2 vectors, 0,-1,0 and a forward vector at the y hit. the first one gives you the hit plane for your floor, if you multiply a direction (normalized forward vector) from this x,z hit add a climbheight to the y hit, and if the ray does it hit, check if its your stairs object, if true, add your max climb height another trick is to define one of more planes, following the angle of your stairs. for the code, the stair becomes simply a "road" that goes up, simply hittest this plane all necessary code is found in Drag3d class. note that climbing will go smoothly then. No step feeling. using the BSP if you run in 3.6 its all automatic. only requirements are to define max climb height and know how to model for BSP projects. Use prefab for generation. using the CollisionMap class, its then just a matter of setting colors, and like with Elevationreader, you simply read the colors, and based on their value, you define the new Y this technic is very low cost, and in combo with rects, it is probably the most easy to code and gives perfect results. there are more ways, but these should get you started. Fabrice On Apr 29, 2011, at 9:29 AM, andrew barry wrote: > when moving over terrain is there a way I can get the y value of an > object beneath me? > > The player moves along and I need to know where the player is on the > ground beneath and also climbing stairs
