Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I have a cuboid with rounded edges for a collider and apply force to the center to drive it forward and make it off center to turn (https://github.com/lucasw/bevy_viz/blob/main/vehicle_avian/src/bin/vehicle.rs#L127). It doesn't behave well on turns though, it acts like a hovercraft.
Is it possible to set friction to different values for different direction (I think bullet and others allowed this), so it slides forward and backwards easily but is resistant to shifting sideways? I suppose I could calculate forces to resist sideways motion and apply them every update, but it seems like that would be less stable than a lower level lateral friction value and always a timestep late, counteracting the slipping of the last update.
I'm okay with using ray casts for suspension, but a few experiments with this using apply_force_at_point depending on how close a corner of a cuboid is to the ground gets me a lot of pitch and roll oscillations even at a standstill- possibly I just need better damping on the suspension springs.
I'll likely try revolute joints with wheels next, and stick to slower speeds so high wheel rotation rates isn't an issue. (https://github.com/Jondolf/avian/blob/main/src/interpolation.rs#L141 'Very high angular velocities (ex: for car wheels or fan blades) can be especially problematic').
Springy balloon-like tires could be fine instead of a more realistic suspension.
If anyone has a working example to share I'd really like to see it.
Beta Was this translation helpful? Give feedback.
All reactions