-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
move() turns KinematicBody2D's scale from negative to positive #5929
Comments
Confirmed in the current master branch. It also seems to behave weirdly as the children that were inheriting the negative scale of their parents are still displayed as scaled negatively (e.g. a Sprite would be h- and v-flipped), but setting the scale anew seems to trigger weird mood swings... |
I don't think physics likes negative scaled shapes, so this is probably not a bug. I suggest you scale/flip the artwork instead |
well I also want to flip a couple different shapes attached to the kinematicbody. Maybe change this to a feature request to allow negative scaled shapes in physics. |
Mine works fine; all I do is constantly scale very time it detects a change in direction (left-to-right and vice-versa). |
@Keyaku - does this affect performance at all? |
@Sslaxx My project is in early stages, so the environment this piece of code is in hasn't that many things happening at once yet; that being said, I can see no performance loss (and I'm working on a medium performant Mac machine). |
Any news on this? |
Yes, do not set scale to negative, collision detection will not work
properly.
If you want to flip your sprite, flip the sprite, not the kinematicbody.
…On Mon, Mar 20, 2017 at 10:50 PM, Bruno Ortiz ***@***.***> wrote:
Any news on this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5929 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z23AhEi4LCqGqMYL8siKJZNgYY6rZks5rnyzvgaJpZM4JVy7k>
.
|
At least can i set the rotation of a shape? I have a polygonShape2d that i want to rotate with the sprite. |
yeah, rotation is fine, just scale won't work
…On Mon, Mar 20, 2017 at 11:13 PM, Bruno Ortiz ***@***.***> wrote:
At least can i set the rotation of a shape? I have a polygonShape2d that i
want to rotate with the sprite.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#5929 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z20P3w7OtvY6MBl1pCJTjBtmbjNoOks5rnzJAgaJpZM4JVy7k>
.
|
Forgot to give an update on this: Just like @reduz said, use sprite flipping. |
As mentioned above, this is not a bug but a limitation of physics bodies, so closing. |
I faced the same issue today, It would be nice if in some way this property is disabled for those kind of node (or at least a warning message is displayed if we tried to use it) |
@fabriceci - With 2.1.x or 3.1.x or a latest Git build of 3.2? If it's one of the 3.x series might be worth opening a new bug and referring to this one. |
@Sslaxx It's on the 3.2 alpha 2. I will open a new issue. |
This comment has been minimized.
This comment has been minimized.
@chucklepie We know physics issues are frustrating, but please don't bump issues out of frustration. |
on v2.1_beta_20160721_win64
If you use the move() function on a KinematicBody2D, and it's scale is set to negative, it's scale will become positive after moving.
This code should print:
before move: -2,-2
after move: 2,2
The text was updated successfully, but these errors were encountered: