Skip to content
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

Unexpected behavior when setting position of KinematicBody2D with Sync to Physics enabled #45483

Open
Tracked by #45334
v3141 opened this issue Jan 26, 2021 · 0 comments

Comments

@v3141
Copy link

v3141 commented Jan 26, 2021

Godot version:

3.2.3.stable

OS/device including version:

Arch Linux Kernel 5.10.7-arch1-1
OpenGL ES 2.0 Renderer: GeForce RTX 2070 Super/PCIe/SSE2
OpenGL ES 2.0 Batching: ON

Issue description:

Here's a video: https://imgur.com/a/bdltzww
All physics bodies are KinematicBody2D's. When enabling Sync to Physics, setting the position of the platform seems to only work when the entire position is set to a new vector. Setting the position via separate parts (i.e. setting the x position and the y position separately) seems to ignore the x axis.
Simply put: the platforms should all be going in a circle, but the top right ignores setting the X-part of the vector, and simply goes in a straight line.

Steps to reproduce:
I used a parametric equation where the x value of the position of each platform is some multiple of cos(t) and the y value is some multiple of sin(t), where t is continuously increased every frame. You don't need to create the kinematic characters on top of each platform, however, you need to enable Sync to Physics, and set each the x and y parts separately rather than setting the global position of each.

Minimal reproduction project:

https://github.com/etables/godot-unexpected-behavior-minimalist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants