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

Objects retain all velocity while moving through a Sensor #610

Open
HyperCodec opened this issue Mar 24, 2024 · 4 comments
Open

Objects retain all velocity while moving through a Sensor #610

HyperCodec opened this issue Mar 24, 2024 · 4 comments

Comments

@HyperCodec
Copy link

I had a game where the player would move through a sensor area, but upon coming into contact with the sensor, they begin to slide at a constant rate and do not appear to be affected by any sort of velocity changes while within the sensor.

@sebcrozet
Copy link
Member

Hi! This is lacking details on how to reproduce the problem. Is there any code you can share, or any steps to reproduce the issue ourselves?

@HyperCodec
Copy link
Author

HyperCodec commented Mar 30, 2024

Hi! This is lacking details on how to reproduce the problem. Is there any code you can share, or any steps to reproduce the issue ourselves?

I used bevy-fps-controller (might be a bug from them) to control the player and then added a platform with a box collider and a sensor in a separate entity on top of it.

The platform was cxhull scene collider.

Also for all the bundles and stuff on the player check the example on bevy-fps-controller repo

@sebcrozet
Copy link
Member

That does sound like a bevy-fps-controller issue. I assume your player is represented by a kinematic body, in which case the physics simulation itself doesn’t have any control over the forces/trajectory applied to the object. So it is up to the character controller to detect obstacles and adjust positions/velocities of the kinematic object.

@HyperCodec
Copy link
Author

HyperCodec commented Mar 30, 2024

That does sound like a bevy-fps-controller issue. I assume your player is represented by a kinematic body, in which case the physics simulation itself doesn’t have any control over the forces/trajectory applied to the object. So it is up to the character controller to detect obstacles and adjust positions/velocities of the kinematic object.

Actually I believe I am using a dynamic rigidbody. There might still be some kinematic velocity changes though

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

No branches or pull requests

2 participants