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

Character movement round 1 #881

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Character movement round 1 #881

wants to merge 17 commits into from

Conversation

erincatto
Copy link
Owner

@erincatto erincatto commented Feb 4, 2025

Sensor updates:

  • support sensor vs sensor
  • enableSensorEvents returns and is false by default
  • sensors now ignore shapes on the same body
    [fix] body move events are now correctly adjusted for time of impact

@jpeletier
Copy link

jpeletier commented Feb 19, 2025

Hello! I am testing this branch, this is really an improvement! Thanks!

I would suggest to rename the new enableSensorEvents flag to detectedBySensors because at first I thought I had to enable this in the sensor itself, but rather it must be enabled in all the other shapes that could be detected by a sensor.

Anyway, thanks!

bool isSensor;

/// Enable contact events for this shape. Only applies to kinematic and dynamic bodies. Ignored for sensors.
/// Enable sensor events for this shape. This applies to sensors and non-sensors. False by default, even for sensors.
bool enableSensorEvents;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to rename the new enableSensorEvents flag to detectedBySensors because at first I thought I had to enable this in the sensor itself, but rather it must be enabled in all the other shapes that could be detected by a sensor.

@jpeletier
Copy link

Hmm, after further testing, I see that enableSensorEvents must be true for both the sensor itself and the detected shape, otherwise no events are produced.

Shouldn't it work so that enableSensorEvents must be true only for the target shape for a sensor to work? Otherwise the sensor itself could be detected by other sensor, which perhaps is not the usual case.

For now, I am setting enableSensorEvents to true for all sensors inconditionally, otherwise they won't work.

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants