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 recently started using Avian, and I'm still relatively new to Bevy as well. I've been trying to create a spacecraft system where the player can control the spacecraft's rotation and forward/backward movement based on its current orientation.
Previously my spacecraft uses a combination of Transform and my own acceleration and velocity system. i used transform.up() for direction-based movement, which worked well. However, since I want to add raycasting and colliders, I decided to rewrite the movement logic using Avian's components.
You can see the current state of my code in this GitHub commit.
Here is old System commit for reference what i am trying to do commit.
The Problems I'm Facing
Damping and Cruising Speed: I want to implement a damping system that prevents the spacecraft from stopping completely. Instead, it should slow down to a certain cruising speed (which you can think of is the avg_speed or something on those lines). However, I'm struggling to figure out how to apply damping in Avian so that it reduces the velocity to this cruising speed rather than zero when there’s no input.
Deceleration to Minimum Speed: When the player presses the "S" key or the down arrow, the spacecraft should decelerate to a defined min_speed. This means that even when decelerating, the spacecraft should never reach a complete stop but rather slow down to this minimum threshold.
Slippery Movement: Currently, the spacecraft feels very slippery, which is odd because the movement was much more precise in my old system. I'm not sure if this is due to the speed calculations or some other factor, but the movement doesn't feel right.
this while i ignore damping i just testing movement with current setup it feels unresponsive.
Also one more is there a Avian way to limit max and min velocity or do just use Clamp or something similar i want to limit angular_velocity and also add min_velocity for linear_velocity
What I've Tried
I attempted to use Avian's damping components, but they didn't seem to work as expected. I applied them to both linear and angular velocities, hoping to achieve a gradual reduction to cruising speed and to allow angular velocity to decrease to zero, but the results weren't satisfactory.
I also tried to adjust other parameters and settings but couldn't achieve the desired effect.
What I Need Help With
I'm looking for advice on how to:
Properly implement a damping system in Avian that allows for movement to slow down to a cruising speed rather than stopping completely.
Adjust the deceleration logic so that pressing "S" or the down arrow key causes the spacecraft to slow down to a predefined minimum speed, but never stops entirely.
Improve the overall feel of the movement to make it less slippery and more responsive.
Any insights or suggestions would be greatly appreciated!
Hello everyone,
I've recently started using Avian, and I'm still relatively new to Bevy as well. I've been trying to create a spacecraft system where the player can control the spacecraft's rotation and forward/backward movement based on its current orientation.
Previously my spacecraft uses a combination of Transform and my own acceleration and velocity system. i used transform.up() for direction-based movement, which worked well. However, since I want to add raycasting and colliders, I decided to rewrite the movement logic using Avian's components.
You can see the current state of my code in this GitHub commit.
Here is old System commit for reference what i am trying to do commit.
The Problems I'm Facing
Damping and Cruising Speed: I want to implement a damping system that prevents the spacecraft from stopping completely. Instead, it should slow down to a certain cruising speed (which you can think of is the avg_speed or something on those lines). However, I'm struggling to figure out how to apply damping in Avian so that it reduces the velocity to this cruising speed rather than zero when there’s no input.
Deceleration to Minimum Speed: When the player presses the "S" key or the down arrow, the spacecraft should decelerate to a defined min_speed. This means that even when decelerating, the spacecraft should never reach a complete stop but rather slow down to this minimum threshold.
Slippery Movement: Currently, the spacecraft feels very slippery, which is odd because the movement was much more precise in my old system. I'm not sure if this is due to the speed calculations or some other factor, but the movement doesn't feel right.
this while i ignore damping i just testing movement with current setup it feels unresponsive.
Also one more is there a Avian way to limit max and min velocity or do just use Clamp or something similar i want to limit angular_velocity and also add min_velocity for linear_velocity
What I've Tried
I attempted to use Avian's damping components, but they didn't seem to work as expected. I applied them to both linear and angular velocities, hoping to achieve a gradual reduction to cruising speed and to allow angular velocity to decrease to zero, but the results weren't satisfactory.
I also tried to adjust other parameters and settings but couldn't achieve the desired effect.
What I Need Help With
I'm looking for advice on how to:
Properly implement a damping system in Avian that allows for movement to slow down to a cruising speed rather than stopping completely.
Adjust the deceleration logic so that pressing "S" or the down arrow key causes the spacecraft to slow down to a predefined minimum speed, but never stops entirely.
Improve the overall feel of the movement to make it less slippery and more responsive.
Any insights or suggestions would be greatly appreciated!
Also here Specific rs file that has all logic
The text was updated successfully, but these errors were encountered: