In this recipe, we are going to look at the three different shapes a rigid body can have, the sphere, box, and convex hull.
Load up PlayStation Mobile Studio and create a new project. Add a reference to Sce.PlayStation.HighLevel.GameEngine2D
and Sce.PlayStation.HighLevel.Physics2D
. We are going to re-use our small earth sprite, earthSmall.png
, once again, as well as our trusty FA-18H.png
sprite to provide a slightly more complex shape. The complete source and all images used can be found in Ch5_Example6
.
Open
AppMain.cs
and replace the existing code with the following code:using System; usingSce.PlayStation.Core; usingSce.PlayStation.Core.Graphics; usingSce.PlayStation.Core.Input; using Sce.PlayStation.HighLevel.GameEngine2D; using Sce.PlayStation.HighLevel.GameEngine2D.Base; using Sce.PlayStation.HighLevel.Physics2D; namespace Ch5_Example6 { public class AppMain { private static Texture2D _textureJet; private static TextureInfo...