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

[Bullet] move_and_slide_with_snap inconsistent is_on_floor #34081

Open
Tracked by #45022
grevius5 opened this issue Dec 3, 2019 · 5 comments
Open
Tracked by #45022

[Bullet] move_and_slide_with_snap inconsistent is_on_floor #34081

grevius5 opened this issue Dec 3, 2019 · 5 comments

Comments

@grevius5
Copy link

grevius5 commented Dec 3, 2019

Godot version:
3.1 >

OS/device including version:
Linux Manjaro

Issue description:
I have a simple gridmap and kinematicbody, if my body stands exactly between 2 tiles with collision the is_on_floor() value jumps to True and False and makes the state inconsistent. If I'm on a tile (not near the edge) the is_on_floor() value is correct.

Steps to reproduce:
Create gridmap with a simple cube (1x1x1) and collision. Create a map and set the kinematic body at (0, 0, 0).

@Miziziziz
Copy link

Are you applying a downward force (like gravity) before calling is_on_floor?

@grevius5
Copy link
Author

grevius5 commented Dec 4, 2019

yes, I apply gravity to the velocity vector, but the problem was that I was using the FLOOR_VECTOR as (0, 1, 0) and the SNAP_VECTOR to (0, 1, 0), settings the snap vector y to negative value seems to work correctly. Now I have some problem with the wall collision if I have a velocity pointing a wall, move_and_slide_with_snap returns to me a velocity != 0 in the direction of the wall and not 0.
An example velocity.x = -1 and I'm attached to a wall, move_and_slide return me -1 as x velocity and not 0

@Sslaxx
Copy link

Sslaxx commented Dec 4, 2019

The snap thing sounds a bit like #34098?

@pouleyKetchoupp pouleyKetchoupp changed the title move_and_slide_with_snap inconsistent is_on_floor [Bullet] move_and_slide_with_snap inconsistent is_on_floor Jan 7, 2021
@pouleyKetchoupp
Copy link
Contributor

Can be still reproduced in 3.2.4 beta 5, but occurs only when using Bullet Physics (default settings). Switching to Godot Physics 3D fixes the issue.

@akien-mga
Copy link
Member

Is this still reproducible in 3.5 RC 1 or later? If so, could someone provide a minimal reproduction project to make this easier to test?

@akien-mga akien-mga added this to the 3.x milestone May 19, 2022
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.

6 participants