Timeline for How to resolve push block physics in a 2D side scroller puzzle
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 11, 2016 at 8:06 | answer | added | joe shmoe | timeline score: -1 | |
May 9, 2016 at 2:20 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Mar 8, 2016 at 17:38 | answer | added | JDolleyArt | timeline score: 1 | |
Mar 5, 2016 at 10:25 | history | tweeted | twitter.com/StackGameDev/status/706063074990694400 | ||
Mar 4, 2016 at 5:29 | comment | added | Skitskraj | It isn't simply too big time steps? Such that in one frame the block is on the left side of the hole, the next time step the block is on the right side of the hole? If so, consider decreasing time step or forcing it back to the hole if it passes over it. | |
Mar 3, 2016 at 22:45 | comment | added | tyjkenn | I've tried that, and it allowed the hole to catch the block sometimes but not always. I would have to shrink it quite a bit for it to work 100% of the time. And if I did shrink it, it would create more problems trying to slide things over it like in the second picture since it is no longer flush with land and there are gaps between blocks. | |
Mar 3, 2016 at 22:33 | comment | added | Greg Petersen | Ah ok. Can you decrease the collider then slightly? | |
Mar 3, 2016 at 22:27 | comment | added | tyjkenn | That part isn't a problem since I disabled rotation on the block, so it already waits until 100% of the base is off the edge. The problem is that when the hole is only barely big enough the other side catches it before it has a chance to drop. | |
Mar 3, 2016 at 22:12 | comment | added | Greg Petersen | Physically, when determining how an object falls, you need to look at the center of mass of the object. More than likely your center of mass is being positioned at the center of your cube. Thus, as soon as more than half of the block is over the hole, the block will start to topple over and not go smoothly down. One solution may be to move your center of mass to the edge of the block. For instance, if you are pushing your block to the right, make sure your center of mass is at the left most position. docs.unity3d.com/ScriptReference/Rigidbody-centerOfMass.html | |
Mar 3, 2016 at 21:11 | history | edited | tyjkenn | CC BY-SA 3.0 |
added 18 characters in body
|
Mar 3, 2016 at 20:40 | history | asked | tyjkenn | CC BY-SA 3.0 |