Тёмный

Physically accurate conveyors in Unity 

Specoolar
Подписаться 6 тыс.
Просмотров 1,1 млн
50% 1

Simple and physic based way of creating conveyors in Unity

Опубликовано:

 

6 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 739   
@nikefootbag
@nikefootbag 3 года назад
For anyone struggling to get this working, the key is to set the conveyor belt's rigidbody to IsKinematic (to be fair this is shown in the video, but it's not mentioned as an explicit step by the author and his fucking conveyor belt's name is also cube so...) For clarity tho: - Boxes that go on the conveyor need a rigidbody and a box collider, defaults settings work with no issue (so Rigidbody Mass: 1, Drag: 0, Ang Drag: 0.05, UseGravity: yes, IsKinematic: no) - Conveyor Belt object needs a rigidbody and a box collider. Rigidbody settings: Mass: 1, Drag: 0, Ang Drag:0.05, UseGravity: yes. IsKinematic: YES Box collider default settings work fine. Make sure the collider extends the length of your conveyor (e.g. if modelling it yourself). Also Note, if you have Physics materials on either object's colliders, make sure the friction values are greater than 0, and friction combine not set to minimum.
@haydenmaines5905
@haydenmaines5905 3 года назад
Replying to save the useful info, thx
@theearthburner6159
@theearthburner6159 3 года назад
Hayden Maines same
@MU6MusiX
@MU6MusiX 3 года назад
@@haydenmaines5905 OMG.. Same
@ShadowRaptor42
@ShadowRaptor42 3 года назад
Yes
@jamess.7811
@jamess.7811 3 года назад
Same
@moofymoo
@moofymoo 3 года назад
Physically correct Biter to chew on these belts next!
@rtificial8292
@rtificial8292 3 года назад
The factory must grow
@RustyNova
@RustyNova 3 года назад
I see you are a person of culture
@axyuwu5678
@axyuwu5678 3 года назад
@@RustyNova and so are you
@coffeeman882
@coffeeman882 3 года назад
IS THAT A FACTORIO REFERENCE?
@whitedawn2122
@whitedawn2122 3 года назад
Physically correct flare to harass my conveyers
@Specoolar
@Specoolar 4 года назад
Use -transform.forward instead of Vector3.back to make the movement in local space
@daliborin
@daliborin 4 года назад
Hey could you share the texture or shader please? I love it
@daliborin
@daliborin 4 года назад
nvm got them
@tayyipensarozkaya2329
@tayyipensarozkaya2329 4 года назад
@@daliborin Where did you get it dude? Sharing is caring :))
@omerfarukbykl6097
@omerfarukbykl6097 4 года назад
@@tayyipensarozkaya2329 merhaba türk kardeşim
@tayyipensarozkaya2329
@tayyipensarozkaya2329 4 года назад
@@omerfarukbykl6097 Merhabalar :)
@MarkRiverbank
@MarkRiverbank 3 года назад
OK, this earned a follow. I already knew the difference between setting the transform and using the MovePosition() method, but I never considered combining them to make something that imparts a physics force without moving.
@R3DSH11
@R3DSH11 3 года назад
youtube: gives you a video of how to make conveyors in unity My brain: invest
@scaneloPT
@scaneloPT 3 года назад
*I literally went to test this out right after, thank you youtube algorithm!* *Btw nice pfp*
@sacaret
@sacaret 3 года назад
This is a very cultured comment section
@scaneloPT
@scaneloPT 3 года назад
@@sacaret *Indeed*
@karimitickaeloogreattemlor3486
@karimitickaeloogreattemlor3486 3 года назад
@@sacaret we are in presence of connoisseurs of quality
@tropicalvikingcreations
@tropicalvikingcreations 3 года назад
@@scaneloPT what are these from?
@ScibbieGames
@ScibbieGames 3 года назад
That visualization was perfect!
@DonBloomfield
@DonBloomfield 4 года назад
I really admire your clear style here. Well done!
@omerfarukbykl6097
@omerfarukbykl6097 4 года назад
Yeah same, good animations
@mattdavisgames
@mattdavisgames 3 года назад
That visual demonstration of rigidBody.position + rigid body.MovePosition is so elegant!!
@televisionandcheese
@televisionandcheese 3 года назад
That's so cool! I didn't expect there to he such a good tutorial at the same time , with an amazing visualisation of how it works!
@NStripleseven
@NStripleseven 3 года назад
Makes sense, actually. MovePosition actually drags the belt a bit, and setting position just teleports.
@damastor918
@damastor918 3 года назад
Almost read "politically correct"
@BRUH2004FTW
@BRUH2004FTW 3 года назад
Bruh
@gspapp
@gspapp 3 года назад
They are!
@Blurro
@Blurro 3 года назад
That's what I read too
@gunbowling2-vrgamedevlog682
@gunbowling2-vrgamedevlog682 3 года назад
UGH, i've had ENOUGH of all this Physical Correctness!!
@kgkbuugj
@kgkbuugj 3 года назад
I was super confused because I thought this was a joke video making fun of political correctness and came to the comments to see what the joke was and saw your comment. I had to check the title again to see this wasn't about politics 😂
@GeeCeeAte
@GeeCeeAte 9 месяцев назад
TWO DAYS!!!! TWO FULL DAYS I SPENT ON THIS!! Dynamically adding anything that touches a belt to a list. Then applying frictionless materials to them. Then making sure the next belt doesn't remove it from a list. Made the list an SO so it could store the data between all the belts. Then making sure whenever something leaves the belt it grabs its original physic material from the dictionary . What a trainwreck!! I am SOOO GLAD I stumbled upon your video. Such an elegant and lightweight solution!!! LIFESAVER!!
@greenbin3028
@greenbin3028 3 года назад
Remarkably simple but elegant implementation, I'll keep this in mind
@foohum48
@foohum48 3 года назад
POV: You got this in your recommended and you have no idea what’s going on.
@Justin_Joy
@Justin_Joy 3 года назад
lmao same
@Zed9659
@Zed9659 3 года назад
Lmao same
@kapzduke
@kapzduke 3 года назад
nah it's just casual mindustry gameplay
@angelplayzvr1905
@angelplayzvr1905 3 года назад
@@Justin_Joy unity is a game engine to make games.most of the best selling games right now are made in unity.
@chilltrooper9423
@chilltrooper9423 3 года назад
Well i was an ex-gamedev and i watched a lotta Unity 3d tutorials so it makes sense for this vid to appear in my recommendation
@user-jq3um6ez2h
@user-jq3um6ez2h 3 года назад
The real direction of the conveyor is the "Vector3.back" in the second line. So, if you want to use other directions, you cannot only modify the transform of the conveyor. (for example, you want to rotate the conveyor) you need to modify the "Vector3.back" to your conveyor's direction. I try to set two empty GameObject "front" and "back", minus them to get a Vector3 as the conveyor's real direction and it works. Vector3 move_position = (front.position - back.position).normalized; Vector3 pos = rigidbody.position; rigidbody.position += move_position * speed * Time.fixedDeltaTime; rigidbody.MovePosition(pos);
@mrgonuts
@mrgonuts 2 года назад
thanks
@vholst
@vholst 3 года назад
I did nearly this exact thing on a final project years ago, was happy to find that it was a rather simple task, helped give life to the background and add some mechanical depth to the movement of our protag
@DevanK-rg3td
@DevanK-rg3td 3 года назад
why was this recommended to me by the algorithm
@diplo6277
@diplo6277 3 года назад
It's not recommended to you, it's delivered to you by a conveyor belt algorithm.
@Lycam
@Lycam 3 года назад
Because you like salami
@JeanBaptisteEmanuelZorg
@JeanBaptisteEmanuelZorg 3 года назад
the algorithm assumed you were smart
@XecularOfficial
@XecularOfficial 3 года назад
Came for the demonstration, stayed for the grooves
@jofouu
@jofouu 3 года назад
ahaha
@redy4archive743
@redy4archive743 3 года назад
I feel like a very epic chad milk drinker is going to "borrow" this thing.
@numbdigger9552
@numbdigger9552 3 года назад
@Fishe wait who?
@memory8936
@memory8936 3 года назад
@@numbdigger9552 you know what I also don't remember his name
@memory8936
@memory8936 3 года назад
It starts with Dani i think
@mattheholic2
@mattheholic2 3 года назад
"I EvaX humbly submit a toast-"
@GzheGzheGzhe
@GzheGzheGzhe 3 года назад
Yandere Dev. Yandere Dev
@ethiopia_real
@ethiopia_real 3 года назад
Now we need a physically correct mech to shoot those belts
@spektremis191
@spektremis191 3 года назад
@@TheNextJakeOwO fellow mindustry player eh?
@guilhemane
@guilhemane 3 года назад
That's incredibly clever
@rosejuliette9180
@rosejuliette9180 3 года назад
It is really helpful that you explained the steps at the start. Too frequently people upload a finished code and I have no idea why what they wrote works for the implementation.
@nekopaddy6498
@nekopaddy6498 3 года назад
Honestly by this stage I don’t even know why I’m getting recommended videos from 11 years ago
@harrysvensson2610
@harrysvensson2610 3 года назад
What a beautiful and elegant and efficient solution.
@falxie_
@falxie_ 3 года назад
First I was "ah yes conveyor" and then I was "ooh conveyor!" Nice work
@ehsome
@ehsome 3 года назад
same lol
@HigherQualityUploads
@HigherQualityUploads 3 года назад
Broke: Watching for dev tutorial Woke: Watching for funky music
@ethribin4188
@ethribin4188 3 года назад
Funnily enough, Factorio started with realistic belt physics. Thats where the two belt sides come from!
@golovastik3609
@golovastik3609 3 года назад
Most useful unity tutorial I have ever seen in 2 minutes
@over7532
@over7532 3 года назад
Came for the conveyors. Stayed for the funky music
@omgtntlol
@omgtntlol 3 года назад
The best 2 minute tutorial. Ever.
@dylaninthemovies
@dylaninthemovies 3 года назад
Thought this was just going to give a link to a marketplace asset but instead it actually shows you how to do it!
@tunnelnugget3181
@tunnelnugget3181 3 года назад
That's really cool but if you want to make it even more accurate you could add some code to accommodate for the conveyor's drag on the box. Small light boxes, for example, won't have as much grip on the conveyor so when it touches the bed the conveyor belt will slide under it for a second while the box starts to accelerate. Large heavy boxes on the other hand will accelerate much more quickly. This leads to a bit of sliding around whenever the box goes from rest to moving or when changing direction. This is actually something I have to deal with sometimes in my line of work and is a major factor when designing conveyor systems.
@Mariusz5400
@Mariusz5400 3 года назад
Really good movie - without unnecessary talking, only specifics
@akisalmenaho8473
@akisalmenaho8473 3 года назад
What is this doing in my feed? No matter, this was satisfying to watch.
@dominictonisson1946
@dominictonisson1946 3 года назад
its actually sad that these physics are even better than in cyberpunk 2077
@LaidbackLost
@LaidbackLost 3 года назад
“He probably thinking about other girls” My brain:
@Zed9659
@Zed9659 3 года назад
Yes exactly
@necaton
@necaton 3 года назад
plot twist: you said that to yourself cause you don't have a girlfriend
@lemonenjoyer6410
@lemonenjoyer6410 3 года назад
He needs morr subs, the editing is amazing :O
@JonathanDavidsonn
@JonathanDavidsonn 3 года назад
What a brilliant way to explain the trick without talking or having to do draw kind of confusing workflow to show. Nice! Great tutorial, though youtube randomly recommended me this for no reason lol.
@dragonslayerornstein387
@dragonslayerornstein387 3 года назад
Oh like the old Little Big Planet 3 Sonic Speed glitch. Glad to know logic breaks when making thing like this
@idrawpictures9140
@idrawpictures9140 3 года назад
This is amazing. Just seeing them work was interesting but the fact that you shared your solution is great
@Mobropro12
@Mobropro12 3 года назад
For those who want to know the song, it's an instrumental of the Putty song on the channel Vat19. It's in one of their challenge videos
@groku5135
@groku5135 3 года назад
Now we need more of this kind of small tutorials ! Great one mate !
@Limofeus
@Limofeus 3 года назад
This is some geneous tactics there. Thanks a lot for the explanation!
@PinkeySuavo
@PinkeySuavo 17 часов назад
perfect video to watch at 06;30 am that i will never ever use in my entire life
@john-paulkrowicki5233
@john-paulkrowicki5233 3 года назад
i dont understand why these channels with no profile pic and no attention has legit the best graphics and layout for vids and / or best project they are showing. just random talent on youtube
@preston7371
@preston7371 3 года назад
probably because it's not meant for just youtube
@mikeohc
@mikeohc 3 года назад
Super cool, and intriguing. Appreciate the breakdown!
@akshat8586
@akshat8586 3 года назад
Remember when SOURCE Engine introduced this first it looked like magic back then you know the VALVE Era..... Half Life 2, TF2, L4D etc Come on u know who is valve !!!!
@AndrewDasilvaPLT
@AndrewDasilvaPLT 3 года назад
Clicked this video just to see if someone already said it.
@thesimracinglegend
@thesimracinglegend 3 года назад
I do not do 3D or games in my life, but I know how to recognize a qualitative video, this is part of it.
@MU6MusiX
@MU6MusiX 3 года назад
I successfully applied conveyor belt movement but can't apply the skin. Can anyone help me to make conveyor belt look just like this please!
@lordrykardthesnake
@lordrykardthesnake 3 года назад
Nice of the princess to invite us over for a picnic eh , Luigi?
@fitrianhidayat
@fitrianhidayat 3 года назад
I somehow thought the title was "Politically correct conveyors" and got confused
@legohexman2858
@legohexman2858 3 года назад
4chan
@yoyo12345
@yoyo12345 3 года назад
RU-vid: here's a great video Me: add to watch later
@RadiantRealmNL
@RadiantRealmNL 3 года назад
Why do the first clips so satisfying?
@DetectivePoofPoof
@DetectivePoofPoof 3 года назад
Wow so nice, thank you! This one goes in the unity playlist for looking up later!
@Halo_Legend
@Halo_Legend 3 года назад
Is it strange that just by looking at it I know exactly what it's made of and how that rubber feels?
@notanenglishperson9865
@notanenglishperson9865 3 года назад
Kinda
@shlok975
@shlok975 3 года назад
It's probably just the textures because i just can't imagine rendering that thing as individual objects
@GrafRucola
@GrafRucola 3 года назад
Plot twist it’s made out of bits and bytes
@shlok975
@shlok975 3 года назад
@@GrafRucola technically it is.
@tobihudiat
@tobihudiat 3 года назад
transform.Translate(Vector2.right * horizontalAxis * speed * time.deltaTime) would be great too for movement. Or the new input System that I don't like. (It would be working with a Vector2.Zero variable that you can assign with a variable like vectomov.x or make the x a public string to assign it how you want) I like this. This is great what you were doing here.
@ritchiemeza
@ritchiemeza 3 года назад
all my years of playing Pokémon will finally pay off
@Hulikkang
@Hulikkang Год назад
This is the best code for unity conveyor belt. you are amazing. thanks for your share from far away.
@lyamschuss8786
@lyamschuss8786 3 года назад
I don't even have Unity, but I do like conveyors, so now I'm installing Unity.
@Markgraf_ON
@Markgraf_ON 3 года назад
me : unreal engine user brain : we need to watch this!
@noatreiman
@noatreiman 3 года назад
Video style and narration are A+
@gunbowling2-vrgamedevlog682
@gunbowling2-vrgamedevlog682 3 года назад
i saw april 1st and thought this was a joke, but then saw 2020, the year april fools was silently canceled. good work
@vinotinto8547
@vinotinto8547 3 года назад
Wouldn't using a gripping physic material sufficient ? It would fully take advantage of the physic engine.
@GeeCeeAte
@GeeCeeAte 9 месяцев назад
sure, but you cant just endlessly move it across the world. youd need to move it back to its start point. which would then just drag the item right back. this code is elegantly mimicking what a looping conveyor belt would do
@maindepth8830
@maindepth8830 3 года назад
Oh, this is way better than moving platforms
@Konprise
@Konprise 3 года назад
This certainly is an underrated channel
@zingers5121
@zingers5121 3 года назад
wasn't looking for this but i needed it
@altshad8998
@altshad8998 3 года назад
This is definitely some physically correct conveyer belts in unity
@jeronimosanchez2014
@jeronimosanchez2014 3 года назад
Jaja that position/movePosition sequence made me smile. Great explanation!
@fletsy7259
@fletsy7259 3 года назад
U know, this is what all players of Satisfactory need
@alexdaguy9626
@alexdaguy9626 3 года назад
Ohhhhhhh this is such a big brain way to make conveyors. Thank you!
@BasicGDCreator
@BasicGDCreator 3 года назад
Im glad youtube recommended this to me
@stevebob240
@stevebob240 3 года назад
That is beautiful. Imagine Satisfactory with these kinds of physics.
@gemstonegynoid7475
@gemstonegynoid7475 3 года назад
We wouldnt be able to make so messy spaghetti though
@stevebob240
@stevebob240 3 года назад
@@gemstonegynoid7475 You're right, my factory would just cease to function. We can dream though.
@Spoon97
@Spoon97 3 года назад
Me : I Will Be Productive In Quarantine Meanwhile Me At Quarantine :
@yoloboogie3674
@yoloboogie3674 3 года назад
this will be on everyone’s recommendation
@sedzanithilivhali882
@sedzanithilivhali882 3 года назад
I can't code, I don't know what unity is, heck I can barely find my way around Microsoft Word but I still found this massively entertaining to watch
@Evolutionmine16
@Evolutionmine16 3 года назад
Really clever, but I’d like to see the performance for a lot of conveyor belts. Also, it wouldn’t impart a reverse direction for the underside of the conveyor belt, i think that’d be a cool problem to solve.
@_IronLion_
@_IronLion_ 3 года назад
Regarding the underside, the idea is to add a separate conveyor script to each to the four parts in the diagram at 1:56, including the circular rotating ones. Though instead of using rigidbody.position and rigidbody.MovePosition on the circular parts, you would use rigidbody.rotation and rigidbody.MoveRotation.
@alicewithalex
@alicewithalex 3 года назад
Very cool editing and idea, would like to see more mechanics and videos about unity in this style
@creativenametxt2960
@creativenametxt2960 3 года назад
It's all fun and games until the underside moves in the wrong direction. And the sides shouldn't drag too, technically. Oh and front and back. Man, I must be fun at parties.
@_ulick
@_ulick 3 года назад
did you watch the full video
@bob_kat7160
@bob_kat7160 3 года назад
Unironically this is a really good tutorial
@ticctacc609
@ticctacc609 3 года назад
this will be in someone's recommended 7 years later
@bestsparton
@bestsparton 3 года назад
Dont know why i was recommended this but hey, who doesn't love physics
@Sole880
@Sole880 3 года назад
So happy someone is showing the dimwits that it’s not difficult
@_-8980
@_-8980 3 года назад
This is a beautifully creative solution
@cenklar
@cenklar 10 месяцев назад
Super nice tutorial and straight to the point, thanks!!!
@roteschwert
@roteschwert 3 года назад
I would probably never have seen this video if it wasn't for the holy algorithm.
@fridajacobson7120
@fridajacobson7120 3 года назад
The texture of it looks insanley real as well
@tacoman8771
@tacoman8771 3 года назад
unitys particle system smash wish list on karlson were almost the top ten
@averagechadlegionary5824
@averagechadlegionary5824 3 года назад
Oddly enough this is quite entertaining for some reason
@attlue
@attlue 3 года назад
You could also set rigidbody.rotation then MoveRotation if you want objects to fall on a collection of spheres that move them along. If you set rigidbody to non-kinetic and set constraints to freeze rotation but not position, it can act like a ball motor for moving a capsule ( that has constraints for rotation ) as a connected anchor using a configurable joint resulting in a rigidbody character motor - AddTorque in VelocityChangeMode is required NOT MoveRotation!
@glukoto8116
@glukoto8116 3 года назад
You just added friction to the motion , well done !
@reactga
@reactga 3 года назад
This is pretty nice
@rohitsaini5547
@rohitsaini5547 3 года назад
Crazy Creativity bro. I never thought of that.
@klink_75
@klink_75 3 года назад
i misread the title as "Physically incorrect conveyors in Unity" and thought it was just a shitpost
@riade1999
@riade1999 3 года назад
This is a great way to end up with weird glutches on the long run
@jerryfrickjr
@jerryfrickjr 3 года назад
I don't Unity at all but if I did, I would say you explained it perfectly
@SirChokk
@SirChokk 3 года назад
Now I got a solution to a problem I don't have. Thank you YT algorithm.
@Zylop6
@Zylop6 3 года назад
youtube recommandation are kicking in
@HarrenTonderen
@HarrenTonderen 3 года назад
RU-vid: physically correct conveyors Me: yes
@deephorizon1365
@deephorizon1365 3 года назад
thanks youtube i really needed to see this
@Gorgggg
@Gorgggg 3 года назад
You just fixed my moving platform which was not working for weeks now :D big thank you
Далее
Remake - Belt / Conveyor System Tutorial [Unity3D]
17:58
НЕДОВОЛЬНА УСЛУГОЙ #shorts
00:27
Просмотров 32 тыс.
Giving Personality to Procedural Animations using Math
15:30
A new way to generate worlds (stitched WFC)
10:51
Просмотров 527 тыс.
Training AI Bots to Fight (they started dancing)
15:06
Просмотров 265 тыс.
I Made Minecraft, but It's 4D
13:48
Просмотров 5 млн
I Made A Physics Engine
6:59
Просмотров 144 тыс.
The Most Impressive Scratch Projects
11:00
Просмотров 4,9 млн
I Made a Donut in Every Version of Blender
11:31
Просмотров 484 тыс.