Can Unity Do Pool?

Ойындар

This video details my somewhat painful attempt to create a functional pool game using ONLY Unity's built-in physics engine.
It goes exactly how you'd expect.
Thanks for watching!
B3AGZ LINKS
------------------------------
Support the Content - b3agz.com/support-the-content/
Join the Discord - / discord
Get b3agz Merch - shop.b3agz.com/
B3AGZ SOCIALS
------------------------------
Twitch - / b3agz
Instagram - / b3agz_
Facebook - / b3agz
Twitter - / b3agz
TikTok - / b3agz
Mastadon - mastodonapp.uk/@b3agz
Chapters:
0:00 Intro
0:23 Setting up a pool table and balls
0:49 Rudimentary ball physics
1:02 Rudimentary ball-hitting stick
2:03 Cue force
2:30 Making a better pool table in Blender
3:05 Cue force multiplier multiplier multiplier
3:38 Post mortem
4:31 Outro
#Unity3D #PoolGame #UnityPhysics

Пікірлер: 19

  • @DarioDAversa
    @DarioDAversa7 ай бұрын

    Fun fact, I tackled this very challenge about a month ago, wanted to make a simple pool game for my kids. I thought Unity's physics would have things covered, but nope -- what a fail that was. I applaud your patience, I stopped working on it half-way.

  • @b3agz

    @b3agz

    7 ай бұрын

    Yeah it's a slog for very mediocre results 😂

  • @ethanwasme4307

    @ethanwasme4307

    7 ай бұрын

    i can't wait to use this fact!

  • @khhs
    @khhs7 ай бұрын

    Got to love the cue ball going full force into the unstoppable wall that was the, uhm, other balls? Not too well versed in the language of pool…

  • @TrecherousMonki
    @TrecherousMonki7 ай бұрын

    Decreasing the physics update time, as well as changing the physics materials would help you get a better result and people would actually learn something by watching :)

  • @sinuquinha.brasil

    @sinuquinha.brasil

    4 ай бұрын

    Hello, have you ever worked on a billiards project with unity? We have a problem with physics, it's not realistic

  • @rhakka
    @rhakka7 ай бұрын

    @b3agz!!! Good to see you again! ❤

  • @acousticcallum
    @acousticcallum7 ай бұрын

    Change the collider at the end of the cue to be a long capsule along the length of the cue rather than a sphere collider, as well as use continuous dynamic on the rigid bodies. You could alternatively, instead of a collider, use a ray cast so that the end of the cue always measures it’s displacement each physics update and then ray casts along this displacement (or sphere cast) and then applies a force to the cue ball proportional to the displacement/physics update time (velocity that frame)

  • @nateflorendo
    @nateflorendo2 ай бұрын

    Interesting, because the most popular 8 ball pool mobile game now was made using Unity.

  • @b3agz

    @b3agz

    2 ай бұрын

    It's not impossible that they used built-in physics but I would be very surprised if they didn't build something custom inside of Unity.

  • @EtCeteraTape
    @EtCeteraTape7 ай бұрын

    man, background music's the same as in Escapist's Cold Take series, threw me off a bit ) cool video, yeah )

  • @SethFunk
    @SethFunk7 ай бұрын

    Cool little video. I know the physics seems janky, but it could have been the settings on the rigid bodies. Default values uses discrete collision detection which is great for a rigidbody hitting a static item, but not so great for multiple rigidbody collisions. In this case Continuous Dynamic would have been a great choice and change the interpolate mode to interpolate. Making sure the mass/drag/angular drag of the items resembles real world, then the behavior is typically fairly close as well. The only thing that I have to change sometimes that isn't really a "default" option is the physics time step. With fast moving objects, sometimes the time step is too large and needs to be decreased for smoother movement. But this is kind of a rare occurrence.

  • @mikhailhumphries

    @mikhailhumphries

    7 ай бұрын

    Do you think it's possible to use default physics for poool game?

  • @SethFunk

    @SethFunk

    7 ай бұрын

    @@mikhailhumphries I would think so.

  • @caidensky9582
    @caidensky95827 ай бұрын

    How would you go about implementing more realistic physics?

  • @b3agz

    @b3agz

    7 ай бұрын

    Essentially by faking it. Write specific code to move the balls realistically. Realistic physics across a whole game would be too expensive to process so the core physics engine is just kind of a rough sketch of real world physics. For a super specific small situation like pool balls (or golf or tennis or football) you can do more realistic physics

  • @gabrielwhite9881
    @gabrielwhite98817 ай бұрын

    No syntax-heighlight..? :D crazy dude.. :P

  • @SondaPower
    @SondaPower7 ай бұрын

    Poker game next 😁

Келесі