Creating a (physics!) joint
In this recipe, we are going to look at simulating a joint to create a pendulum style effect, swinging one physics body around another.
Load up PlayStation Mobile Studio and create a new project. Add a reference to
Sce.PlayStation.HighLevel.Physics2D. We will be re-using our earth sprite from the earlier recipe, this time reduced in size by 50 percent and named, appropriately enough,
earthSmall.png. Add this image or a similar one to your scene and set its Build Type to Content. The complete source and all images used can be found in
How to do it...
AppMain.csand change the code to the following:
using System; usingSce.PlayStation.Core; usingSce.PlayStation.Core.Graphics; ...