02 December 2016
From the Forum – Issue #144
Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forum posts that cover important topics.
One of the powerful features of Corona Labs’ implementation of Box2D physics is the ability to simulate “chains.” Chains, also referred to as “edge shapes,” are useful when you want to construct hills, slopes, and other physical shapes that bend the typical rules of Box2D. Basically, they are constructed from a series of vertices that define the link segments — but just how many vertices can you use? Are there other gotchas? Corona’s own Brent Sorrentino jumped into this thread to clear up the details.
Corona’s powerful vector APIs are great for making boxes, circles, and polygons, but what if you want an arc or a semi-circle? Some enterprising Corona developers contributed to this thread with some inventive solutions.
When using physics in a game, not everybody wants 9.8 m/s² of gravity pulling objects toward the ground. Sometimes you want things to float in air, or maybe even go upwards! What’s more is that, in certain cases, you’ll want only some objects to behave outside the bounds of the “world gravity” setting. Fortunately, as illustrated in this post, you easily can control gravity on an object-by-object basis.
Do you have a particular forum thread that was helpful for you? Let us know about it. Email firstname.lastname@example.org and put FTF: and the forum title in the subject and include the URL in the email and we will consider adding it to an upcoming From the Forum.