-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scale X=-1 breaks collision physics #2688
Comments
@ufukbakan Thanks for the issue! This is definitely unexpected, my guess is there are some flipped normals in the collider geometry when this happens causing the errant behavior. Are you using |
I was scaling actor itself not the graphics (because i didnt want to loop all graphics and flip each of them) but it broke the physics so i had to loop each graphic animation to flip them |
@ufukbakan Would a new feature on the graphics component to flip all the graphics associated with the actor during drawing be useful? Something like const actor = new ex.Actor({...});
// Flips during drawing but doesn't
actor.graphics.flipHorizontal = true;
actor.graphics.flipVertical = true; |
Yes, i think it will be, so we dont have to define runLeft, runRight, jumpLeft, jumpRight, idleLeft, idleRight, attackLeft, attackRight... Just we will able to define run, jump, idle attack graphics and flip graphics if facing left |
After setting scale.x to -1 my character goes through other colliders, can we fix this
The text was updated successfully, but these errors were encountered: