|
-
M.D.
i dont follow Q_Hybrid, simply using getPixel on a astatic bitmap shouldn't effect performance at all, its just a lookup isn't it?
ever, i'd do what V said, full white should be the highest point possible, black being the lowest. Then simply find the percentage of gray you're at
var maxHeight = 200;
var color = heightMap.getPixel(hero._x, hero._y) >> 24 & 0xFF
var height = (color / 255) * maxHeight
hero._xscale = hero._yscale = height
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|