Code:
var wm:b2WorldManifold = new b2WorldManifold();
ce.contact.GetWorldManifold(wm);
trace("wm.normal.y: "+wm.normal.y);
for most of my valid contacts with platforms this returns
-1 while i stand on top of them.
recently about 15% of platforms have started returning
1 while i stand on top of them.
the platform contact filtering still returns correctly, so i stand on the platform, just my wm.normal.y which i use to check if i can jump is wrong.
Code:
var m:Matrix = matrix.clone();
m.tx = 0;
m.ty = 0;
m.invert();
var n:V2 = b2body.GetLocalVector(e.normal);
var p:Point = m.transformPoint(n.toP());
e.contact.SetEnabled(p.y < -0.6);
I've check the transform matrix. they seem to be the same. all platforms are generated from the same library movieclip...
any idea what i did wrong to cause this?
i haven't run into this on my other projects.
the current game is simple enough that i will just add an ugly work around for now. but on other projects this could be a big problem for me, so i would appreciate any help sorting it out.