Skip to main content
15 events
when toggle format what by license comment
Dec 27, 2021 at 22:41 vote accept Oliver Hvam
Dec 27, 2021 at 3:14 answer added Candid Moon _Max_ timeline score: 0
Dec 27, 2021 at 2:54 history edited Candid Moon _Max_ CC BY-SA 4.0
Fix code markdown.
Dec 27, 2021 at 1:25 comment added Oliver Hvam I just tried adding SyncTransforms to no avail. I realise it's probably my implementation thats wrong so I've added my code for the rotation. The specific problem is that collided always stays false.
Dec 27, 2021 at 1:22 history edited Oliver Hvam CC BY-SA 4.0
added 874 characters in body
Dec 26, 2021 at 23:49 comment added DMGregory Did you call SyncTransforms first to notify the physics engine of the position/orientation of the new collider?
Dec 26, 2021 at 23:34 comment added Oliver Hvam @DMGregory i tried using the isTouchingLayers method of the 2D Collider but it seemed to only identify the touching layers after running a physics update and not directly after instantiating the triggerbox. I'm not sure if the OverlapCollider works differently.
Dec 26, 2021 at 22:57 comment added DMGregory @Oliver what barrier did you observe to checking for overlapping triggers using eg. OverlapCollider?
Dec 26, 2021 at 22:09 history edited Pikalek CC BY-SA 4.0
fixed typos
Dec 26, 2021 at 20:55 comment added Oliver Hvam @Candid Moon Max the problem i ran into with the Shadow collider was that there seemed to be no way of checking for triggers after instantiating the triggger collider in the "endspot" of the 90 degree rotation.
Dec 26, 2021 at 20:49 comment added Oliver Hvam @DMGRegory's suggestion to using the OverlapBox on the children seems like a very fine solution to my problem with tetrominoes but I'm still wondering how one would achieve the same result when the object has a complicated Polygon Collider.
Dec 26, 2021 at 0:52 comment added DMGregory "more complicated 2D shape" What is a tetromino if not a collection of boxes? What do you perceive is making this more complicated than what OverlapBox can do for you?
Dec 26, 2021 at 0:15 comment added Candid Moon _Max_ If you want a more complicated shape then you need a collision detection for such a shape. Mesh collider (Polygon Collider for 2D) should work. Could you also elaborate on this "no way to check if an object is colliding directly after spawning it"? Your thoughts on solution are valid, I am not sure what to recommend exactly, rotating a shadow collider or using a collision function is the best in my opinion. Some hacks may be possible depending on the gameplay but as a general solution collision detection is good.
S Dec 25, 2021 at 23:34 review First questions
Dec 26, 2021 at 22:09
S Dec 25, 2021 at 23:34 history asked Oliver Hvam CC BY-SA 4.0