What steps will reproduce the problem?
1. compile Away3DTerrainTest.as using a non-symmetrical heightmap1.jpg
2. try moving around:
3. notice that physics response doesn't match the rendered terrain
Hello,
I love Jiglib, thank you so much for all your hard work. Not sure how to get in
touch with the team but the email was listed on the front page of the
jiglibflash.com website is broken. I’ve discovered a bug in the terrain class
for away3d meshes: the physics representation is rotated 90 degrees and
mirrored compared to the away3d mesh. The one example file does not show this
since the heightmap image is symmetrical, so the bug was never detected. I’ve
been bashing my head against this for three days and sadly I’m just not the
coder you are so I thought I’d send a desperate plea to you to ask that you
check it out.
Perhaps the solution will be super easy. Something along the lines of the loop
iterating pixels in the wrong order, or an xy coordinate is negative when it
should be positive.
To reproduce this bug, compile Away3DTerrainTest.as but use a heightmap image
that isn’t symmetrical (ATTACHED FOR YOUR CONVENIENCE) – for example put a
mountain in one corner. Then run your compiled away3d flash file you will see
the terrain is rendered correctly but the physics response acts as if the hill
is invisibly situated on the opposite corner. Gosh it sounds so easy to fix,
and I spent several hours trying, but I have failed. I suppose I could simply
make two heightmaps, one to send to jiglib and the other mirrored and rotated
in photoshop to use for the away3d mesh on screen. But to do so I’ll have to
rip apart the physics.createTerrain class.
I figured that perhaps you are so much more intimately familiar with the engine
that the fix will present itself to you in mere seconds. I’m being
optimistic, but I figure, might as well try simply asking, right?
*YOU ROCK! * Thank you so very much. Keep up the wonderful work and if I can
help in any way let me know.
Kind regards,
Chris K – aka McFunkypants
Original issue reported on code.google.com by breakdan...@gmail.com on 15 Dec 2010 at 7:42
Original issue reported on code.google.com by
breakdan...@gmail.com
on 15 Dec 2010 at 7:42Attachments: