Topic: How to work with the Custom Intercept?
I've setup a custom intercept and my my delegate is being called. For example, I have a a height resolution of 4047 so I'm getting called 4097x4097 times. My code has height data for 5000m x 5000m so that roughly makes each height position represent a 1.2m square. So I essentially ignore the mx, my and just return the array item based on the ordinal position of the delta of mx or my
To summarize my code it's almost just;
private double? OnGetElevation(double mx, double my)
{
if (mx.HasChanged) x++
if (my.HasChanged) y++
return data[x,y]
}
However, after the 'Start' has completed the terrain heights are only applied to something like 1 quarter of the terrain tile. The heights look correct, i.e. the ground features look correct, but I don't understand why the heights are not being evenly spread over the terrain tile.