> In version 0.2.1, I'm trying to modify lesson-104.py to track the
> actual height of the land, but the camera seems to always stay at the
> same y position. Here's a copy of my modified code.
> land.get_height(anything) always returns 1.09803926945.

As Jack said, the function get_height is waiting for integers cause this function 
actually returns only the heights given to create the map (ie the height values of the 
array)

so you have 2 solutions:

transform float to interger:
land.get_height(int(camera.x), int(camera.z))

or read the real height, the one that is interpolated between the values of the array. 
To obtain this real height you can use raypicking or use one of the new function of 
the land (I think it is implemented in 0.2.1 else it will be available soon ;)

land.get_true_height(float_x, float_z)

(this function return the graphical height at 1 point of the land ie the height you 
can see on your screen. I means as you know the land is morphing to have more accuracy 
near the camera and less far away so the height you get for 1 point can be modified by 
the camera position!)

hope that's clear ?

-blam


-- 
Pour vous desabonner envoyez un mail a [EMAIL PROTECTED]

Reply via email to