I checked out your channel its super lovely what you are doing really hope the best for you. I am also a proud member of your news letter :>
@bruninhohenrri
10 ай бұрын
So cool ! I can't even wrap my head around how they achieve 3D collision with differente meshes on those modern 3D engines. So cool.
@DavidLindes
10 ай бұрын
I imagine it's a lot like this, with just a few more and/or changed steps. :) Hard to wrap one's head around the whole thing, but... if one breaks it down, it becomes more doable in the individual pieces, and then once one has that, then one zooms out, and... it becomes easier. Not always easy, but easier. :)
@acatisfinetoo3018
3 күн бұрын
As far as i am aware in 3D engines they use bounding capsules or just choice a " best" fitting shape to approximate the complex mesh...Just look at how it's done in games engines such as unreal and unity, there is no such thing as pixel perfect coilsion in 3d games, it would cost way too much resources and memory even on the fastest machines.
@programmingwithnick
9 ай бұрын
Free time here. You are doing an amazing job. Keep it up!
@pattvira
9 ай бұрын
Thank you!!
@hellothere8547
10 ай бұрын
Amazing content! Keep it up! Thank you!
@pattvira
10 ай бұрын
Thank you so much!
@gurudk3378
5 ай бұрын
i have a game where circle collides with blocks (rectangles) and need to change the direction of that ball after colliding. How to code it?
@fredrik3685
10 ай бұрын
Nice and clean explanation.
@DavidLindes
10 ай бұрын
Very nice tutorial! Subbed, and this video shared with someone I mentor who's just getting into Processing (and/or p5). :) Looks like you have a bunch more, too... excellent!
@DavidLindes
10 ай бұрын
Oh, one question, though: In the last section, what if mouseX and/or mouseY are between the two edges we check for? seems to me like we just don't set closeX or closeY in those cases?
@pattvira
10 ай бұрын
@@DavidLindes I initialized closeX and closeY as mouseX and mouseY. So if at the very beginning, mouseX and mouseY are already inside the rectangle, then distance would be 0 and would be less than cr and the collision would be detected. So you still want to set closeX and closeY even in that case so that you can calculate the distance. Hope that answered your question!
@DavidLindes
10 ай бұрын
@@pattvira Ahh, that totally makes sense! I missed the initialization, and I guess it probably wasn't still on the screen at whatever point I paused and looked. :)
@mn4840
10 ай бұрын
nice!👍
@pattvira
10 ай бұрын
Thank you so much 😊
@gonzaloayala9334
10 ай бұрын
If i want to detect a collision between an array of circles and rects i need a nested for loop?
@pattvira
10 ай бұрын
I have a tutorial that does just what you asked coming out Friday so be on the lookout for it! It’s a combination of OOP and nested loop.
@gonzaloayala9334
10 ай бұрын
@@pattvira Cool, ty
@DavidLindes
10 ай бұрын
@@pattvira haha, awesome that you already have that in the queue. :)
Пікірлер: 21