🎨
MYTY
MYTY Kit
MYTY Kit
  • 👋Before you begin
    • GM, MYTY! 👐
    • What is MYTY Kit?
    • MYTY Kit System Requirements
    • Prerequisites
    • MYTY Kit Glossary
  • ✍️Getting started
    • 1. Prepare Illustration PSB
      • Key Requirements
      • Basics of Avatar Animation
      • Recommended PSB file structure for Trait Mapper
    • 2. Trait Mapping
      • Guide to MYTY Kit Trait Mapper
      • New Field: Token ID
    • 3. Install Unity
    • 4. Import MYTY Kit
    • 5. Import 2D Avatar Assets
  • 🔮Make animation
    • 6. Before Rigging
    • 7. Rigging in Sprite Editor
      • Mesh in Unity
    • 8. MYTY Kit Controllers
      • Bone 1D Controller
      • Bone 2D Controller
      • Sprite 1D Range Controller
      • Sprite 2D Nearest Controller
      • Rigged Sprite 2D Nearest Controller
    • 9. Apply Motion Tracking
      • Character Movement
      • Bone Motion Adapters
        • Bone2D
        • BoneTiltOrPosition
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • Pupil & PupilAll
      • Sprite Motion Adapters
        • EyeBlink & EyeBlinkAll
        • EyeBrow & EyeBrowAll
        • MouthSprite
      • Advanced documentation
        • Mapper & Reducer
        • Stabilizing method
    • 10. Set up AR Face Mode
    • Advanced Animation
      • Physics 2D
      • Sprite Masking
      • Idle Animation
  • 🤹Connect with MYTY Metaverse
    • 11. Export MYTY Avatar
      • MYTY Avatar Viewer
      • Updates on File Export Format — Zip file
    • 12. Upload to Avatar Manager
  • 🗒️Appendix
    • 😄Mediapipe Extension
    • 🎨MotionAdaptorPalette
  • 🗂️MISC
    • About Us
    • Troubleshooting & FAQ
    • Change Log
    • License
      • License.md
    • Legacy Documentation
      • [v0.1.0] 4. Import MYTY Kit
      • [v0.1.0] 6. Before Rigging
      • [v0.1.0] 9. Apply Motion Tracking
      • [v.0.1.0] 11. Export MYTY Avatar
Powered by GitBook
On this page
  • Applying Physics Preview
  • What kind of animation can be created by applying physics?
  • Overview: How to apply physics in Unity
  • Settings for specific cases
  • Case 1: an example of physics acting in the same direction as gravity
  • Case 2: an example of physics acting in the opposite direction to gravity.
  1. Make animation
  2. Advanced Animation

Physics 2D

This section describes how to create physics-based animations.

PreviousAdvanced AnimationNextSprite Masking

Last updated 2 years ago

Applying Physics Preview

What kind of animation can be created by applying physics?

  • The built-in Physics Engine in Unity handles the physics for gameobject interactions and the various effects like gravity, acceleration, collisions, etc.

  • For the NFT avatar, you might want to use the hinge joint for the hair simulation or the spring joint for jiggling

Overview: How to apply physics in Unity

  • In order to create these types of simulations, you will need to implement 2D physics something that Unity excels at.

Hinge joint2D - ENG Tutorial

Hinge joint2D - KOR Tutorial

Spring joint2D - ENG Tutorial

Spring joint2D - KOR Tutorial

Settings for specific cases

Case 1: an example of physics acting in the same direction as gravity

  1. Bones are set up and positioned at an irregular location

  2. No 2D Box Collider is needed for the head bone

Setup

  • Apply weight of the helmet part to static or higher hierarchy bone in this case, BoneHead.

  • Apply evenly distributed weight to the strap with the desired number of bones. 6 bones are used to execute a chain-like movement.

Problem

  • The root bone of the strap becomes disjointed when the scene is played.

    • This is caused when the Body Type of the [Rigidbody 2D]component is set to Dynamic

Solution

  • Apply Static for Body Type

  • This will result root bone of the strap following its mother bone when the scene is played.

Finessing edges of the sprite image

  • Problem

    • by Default, in [Hinge Joint 2D], there’s no limit is set in angles that will cause breaking edges when the avatar is projecting dynamic movements.

  • Solution

    • Apply angle limits by enabling the check box of Use Limits and input values in Angle Limits

  • For this particular image, It’s best to have a direct child bone, which is the 2nd bone of the strap, and leave other bones under it without any Angle Limits applied.

Case 2: an example of physics acting in the opposite direction to gravity.

  1. Bones are set up and positioned at an irregular location

  2. Needs to bleed out of the scene

  3. Needs to float upwards

Setup

  • Apply weight to the head part to static or higher hierarchy bone in this case, BoneHead.

  • Apply evenly distributed weight to the rainbow with the desired number of bones. 3 bones are used to execute a chain-like movement.

Finessing for the expected outcome

  • To bleed out the image outwards, reposition the last bone upwards

  • Since the Rainbow needs to float, set Gravity Scale to a negative value in [Rigidbody 2D]

  • It’s best to have direct child bone, which is the 1st bone of the rainbow, in Static for Body Type in [Rigidbody 2D]

  • Apply angle limits for the remaining bones by enabling the check box of Use Limits and input values in Angle Limits

Result

  • Rainbow bleeds out

  • Limited angle set to minimize movements of the rainbow

🔮
Hinge Joint2D (ENG)
Hinge Joint2D (KOR)
Spring Joint2D - part 1 (ENG)
Spring Joint2D - part 2 (ENG)
Spring Joint2D - part 1 (KOR)
Spring Joint2D - part 2 (KOR)
Problem - the root bone of the strap is disjointed with helmet
Bones behave correctly along with helmet
Problem - The edges of the strap look broken because there is no limit on the angle of movement.
By limiting the angle of movement of the strap, the strap edges are not broken.
Rainbow is acting in the opposite direction to gravity
Helmet bone hierarchy example
Body Type: Dynamic -> Static
Enter a negative value for Gravity scale
For 1st bone of chain-movement, set 'Body Type' to 'Static'