|
|
Op 30/09/2020 om 22:17 schreef Kenneth:
> "BayashiPascal" <Pas### [at] BayashiInJapannet> wrote:
>> You may find some useful resource for collision detection here:
>>
>>
https://gamedevelopment.tutsplus.com/tutorials/collision-detection-using-the-separating-axis-theorem--gamedev-169
>
> Wow! That's quite complex for my poor brain-- but I will *try* to follow along.
> Unfortunately, it looks like some of the visual 'demos' are missing(?)
>>
>> In your case, the objects are axis-aligned as far as I can see...
>
> Yes, basically a '2-dimensional' field of greeble objects, all at simple
> 90-degree angles.
>
>> ...so AABB collision detection may even be sufficient. Have a look here too:
>>
>> https://manbeardgames.com/tutorials/aabb-2d-collision-checks/
>
> Thanks; I'll check that out as well.
>
>
>
I think there is a fairly simple way, close to what Bill suggested, by
using (1) random placement on the roof and (2) if more objects are to be
placed to test collisions using the inside(O,V) function. You may need
to provide a bit more room around the existing object O and the new
object by using test objects just a little larger than those you are
going to place.
--
Thomas
Post a reply to this message
|
|