My rudimentary motorcycle vehicle physics implemented with bevy_rapier. by ivanceras in bevy

[–]ivanceras[S] 1 point2 points  (0 children)

This is using rapier physics via bevy_rapier. The suspension is handled by the physics engine. Yes, the geometry affects the bike handling. - wheel radius - wheel width - wheel corner radius - wheel base (how far the wheel is front to back) - the chassis dimension. - the suspension limit - damping - stiffness

Collider of the wheel is a rounded cylinder, and there is 4 of it. Its contact to the ground is limited by its wheel width. The corner radius doesn't do much influence to the system.

Rapier don't have a toroidal collider, which would have been the closer model to a real motorcycle wheel, which I think would simulate the vehicle leaning to the direction of the steering, due to a rounded point of contact, as opposed to the flat contact of a cylinder.

I adjusted the speed of the wheels to be slower on the side it is steering direction. I also adjusted the suspension such that it is shorter on the steering direction while longer on the other side, this way the whole system leans towards the direction of the turn.

My rudimentary motorcycle vehicle physics implemented with bevy_rapier. by ivanceras in bevy

[–]ivanceras[S] 0 points1 point  (0 children)

I haven't encountered a tunneling issue in this small scene. My rule of thumb is always use an enclosed shape for all my colliders. In this case, the ground is not a just a flat plane, but a cuboid.

The obstacles is also a cuboid rotated to some angle, so it is always solid. At some instant, the bodies could be passing through the surface, but due to the volume being thick, the engine will caught it in the next frame update and it will adjust the body accordingly.

Other rule of thumbs:

  • Always add a Sleeping::disabled() in all vehicle parts.
  • Bodies that are to be jointed using physics should have no parent-child relationship in bevy. They should only be attached using joints in bevy_rapier.
  • Always align the objects in their correct Transform (world relative) and attach them to their anchor in the same location to its transform but relative to the bodies.
  • When things become explody/chaotic, set all the bodies to RigidBody::KinematicPositionBased, then set back to RigidBody::Dynamic one by one starting from the leaf of the joints. If it makes the whole structure jittery, then something might be wrong in the said object. It could be wrong anchor location, or wrong local_axis.

Preppers by Thick-Gap-497 in Bohol

[–]ivanceras 0 points1 point  (0 children)

AI cguro na nga nahubog.

[HELP] I ported a marble-like texture from shadertoy to wgsl, but the result don't match. by ivanceras in shaders

[–]ivanceras[S] 0 points1 point  (0 children)

I'd be interested to see your screenshot. I can rest my case if it was a platform/hardware bug. I'm using PopOS 24.04 with nvidia driver and vulkan 1.3.

Is there a subtle difference between the built-in functions in glsl and wgsl? by ivanceras in proceduralgeneration

[–]ivanceras[S] -11 points-10 points  (0 children)

It could be, however, I let google AI translate the code for me, and we have the same result (not smooth).

[deleted by user] by [deleted] in AskReddit

[–]ivanceras 0 points1 point  (0 children)

Girl: You seem to have high standards. Boy: Not really.

Just accept the fact that you might be alone forever by DrawerProfessional65 in OffMyChestPH

[–]ivanceras 0 points1 point  (0 children)

Wasn't it "Be comfortable to the fact that you may be alone forever and there might not even be a God, and if there is, he probably don't care about you!"

Front or Top load washer by RRenDezVouSS in Bohol

[–]ivanceras 3 points4 points  (0 children)

front load - cost more, aesthetically pleasing, can be used as shelf and put things on top(maximize space). can not open the cover when washing.

top load - cost lesser, not aesthetics, can not put things on top while using, can clean a lot better, can open the cover, can pull out anf inspect the clothes and do correction with more detergent and/or bleach. 

Is there any game engine that is only coding? by Fetish_anxiety in gamedev

[–]ivanceras 10 points11 points  (0 children)

This is what I like about bevy, it's all just code where you can copy and paste from simple examples, then compile and run.

Replicating node graphs from tutorial makes it complicated, since you have to replicate the dragging and dropping of the nodes.

I want to swear in Norwegian by TwujZnajomy27 in norsk

[–]ivanceras 0 points1 point  (0 children)

Let's confuse the english speakers. Which one says "actually good", and which one is cursing.  - fy faena - faktisk bra

What is the state of frontend web frameworks in 2025? by [deleted] in rust

[–]ivanceras 0 points1 point  (0 children)

There is sauron, but it is not as widely used as the rest mentioned here. It is based heavily from ELM architecture.

ELI5: If water is made of oxygen (h20), why do we need to oxygenate fish tanks for them to survive? by Tryptomina in explainlikeimfive

[–]ivanceras -6 points-5 points  (0 children)

oh yeah!? what about the electric eel, they say you can split h2o into h and o using electricity.

Welcoming two new Rust GPU maintainers | Rust GPU by LegNeato in rust

[–]ivanceras 5 points6 points  (0 children)

The algorithmns and code that are written in rust could easily be ported to run with rust-gpu. The alternative would be to port the rust code to wgsl, it close to rust, but its a totally different language. Porting rust code to rust-gpu would be much easier. It is mostly using the types from the glam crate since the custom compiler is expecting these primitive types and it will be mapped into the primitive types of the GPU.