1 / 19

Creating & Using Sprites Adding Colliders Including RigidBody Components

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.

gilbertd
Download Presentation

Creating & Using Sprites Adding Colliders Including RigidBody Components

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating & Using Sprites Adding Colliders Including RigidBody Components Customizing Physics 2D Materials

  2. 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

  3. 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

  4. 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)

  5. Making the Images into Game Sprites now you can click-and-drag copies of these images into your game

  6. 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

  7. 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

  8. Polygon Colliders when polygon colliders are added to complex shapes they often need to be edited

  9. 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

  10. 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.

  11. RigidBody 2D Components have a Gravity Property

  12. RigidBody 2D Components have a Gravity Property

  13. Physics Material 2D we can create custom properties such as friction and bounciness to objects by adding Physics Materal 2D components

  14. the Physics Material 2D component is added to the Material field of the collider of the sprite whose material properties we are modifying

More Related