You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered several strange behaviors while trying to implement top-down directional movement in my game using Bevy version 0.14.1 and Avian2D version 0.1.2. Here are the issues I faced:
Linear Velocity Acting Strangely:
I downloaded some 2D examples and ran both kinematic and dynamic examples. On my 240fps monitor, the game appeared to run slower compared to a 60fps monitor.
Observation: When I removed Time.deltaTime from the calculations, everything seemed to work correctly, which led me to assume that this adjustment would also apply to angular velocity.
Problem: However, for angular velocity, removing Time.deltaTime caused erratic behavior on different screens. When I added Time.deltaTime back, it worked as expected.
Linear Velocity and Object Orientation:
Another issue is with linear_velocity.x and linear_velocity.y not aligning with the object's orientation. I tried multiplying linear_velocity.x by transform.up().normalized(), which worked to some extent.
Observation: I noticed that the aircraft slows down when turning, as if it's losing speed while turning. This behavior was unexpected.
This issue is a follow-up to issue #498, but I decided to create a new issue due to the weird behavior related to linear_velocity and Time.deltaTime.
Steps to Reproduce:
Use a high refresh rate monitor (e.g., 240fps).
Run the 2D kinematic and dynamic examples in Bevy with Avian2D.
Observe the difference in game speed at different frame rates.
Modify the velocity calculations by removing or adding Time.deltaTime.
Expected Behavior:
The game should run consistently across different frame rates.
linear_velocity should respect the object's orientation without unexpected speed loss during turns.
Description:
I've encountered several strange behaviors while trying to implement top-down directional movement in my game using Bevy version 0.14.1 and Avian2D version 0.1.2. Here are the issues I faced:
Linear Velocity Acting Strangely:
I downloaded some 2D examples and ran both kinematic and dynamic examples. On my 240fps monitor, the game appeared to run slower compared to a 60fps monitor.
Observation: When I removed
Time.deltaTime
from the calculations, everything seemed to work correctly, which led me to assume that this adjustment would also apply to angular velocity.Problem: However, for angular velocity, removing
Time.deltaTime
caused erratic behavior on different screens. When I addedTime.deltaTime
back, it worked as expected.Linear Velocity and Object Orientation:
Another issue is with
linear_velocity.x
andlinear_velocity.y
not aligning with the object's orientation. I tried multiplyinglinear_velocity.x
bytransform.up().normalized()
, which worked to some extent.This issue is a follow-up to issue #498, but I decided to create a new issue due to the weird behavior related to
linear_velocity
andTime.deltaTime
.Steps to Reproduce:
Time.deltaTime
.Expected Behavior:
linear_velocity
should respect the object's orientation without unexpected speed loss during turns.Actual Behavior:
Time.deltaTime
causes erratic angular velocity behavior.Environment:
Additional Context:
Time.deltaTime
is being applied or calculated within the physics update.Thank you for looking into this issue!
The text was updated successfully, but these errors were encountered: