190 likes | 214 Views
Creating & Using Sprites Adding Colliders Including RigidBody Components Customizing Physics 2D Materials. PowerPoint or OpenOffice Impress can be used to model sprites Most tools of this type have bitmap textures such as brick, stone, and grass set borders to zero. Paint Shop Pro.
E N D
Creating & Using Sprites Adding Colliders Including RigidBody Components Customizing Physics 2D Materials
PowerPoint or OpenOffice Impress can be used to model sprites Most tools of this type have bitmap textures such as brick, stone, and grass set borders to zero
Paint Shop Pro Copy and Paste objects from PowerPoint to PaintShopPro and save them as .png images be careful not to use smoothing or sharpening filters on the images make magenta (255,0,255) the background color and then set the transparency to the background color
Adding Images to the Assets in a Unity Project just click-and-drag the images from the desktop to the Assets Panel (or in a folder in the Panel)
Making the Images into Game Sprites now you can click-and-drag copies of these images into your game
Adding Colliders to Sprites bases and walls get edge colliders platform bricks get box colliders circular objects get circle colliders complex shapes get polygon colliders 1. highlight sprite 2. click on add component 3. select Physics 2D 4. then choose collider
Edge Colliders Can Span Multiple Sprites you can click-and-drag collider points (green) to reshape the boundary you can click on a different spot to create a new point on a collider boundary you can control-click (red) points to delete them
Polygon Colliders when polygon colliders are added to complex shapes they often need to be edited
Editing a Polygon Collider You can click-and-drag articulation points on the collider You can add articulation points by clicking on the collider border You can delete articulation points by control-clicking them
RigidBody Components For two object to interact at least one of them must also have a rigidbody component. RigidBody components are typically attached to moving objects only.
Physics Material 2D we can create custom properties such as friction and bounciness to objects by adding Physics Materal 2D components
the Physics Material 2D component is added to the Material field of the collider of the sprite whose material properties we are modifying