Sign in to follow this  

p2 body seems to be touchingDown but up in the air next to a wall

Recommended Posts

the problem can be seen here (as always ;-) )


i apply a frictionless material so it doesn't stick to the wall... 


this works most of the time..

but if you push the button to move into the direction of the wall in the air again.. it will eventually stick to the wall ..  (it does that even if i set every contactmaterial to friction=0 )

i think it shouldn't because there is no friction at all..




this is maybe related to another post right here:


i am trying to get something like the arcade "touchingDown" with this function (thx to rich's lab experiment)


function touchingDown(player){    var yAxis = p2.vec2.fromValues(0,1);    var result = false;    for(var i=0; i<; i++){    var c =[i];        if( === || ==={            var d =,yAxis); // Normal dot Y-axis            if( === d *= -1;            if(d > 0.4) result = true;        }    }    return result;}

and it showed me that (if you change (d>0.4) to (d>0) )  touchingDown is always true when the player sticks .. i honestly think that this is something to be solved at the "phaser side"   - at least i did't find a 'cure' yet



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.