Jump to content

Fixing child sprite rotation gitter


xtremetom
 Share

Recommended Posts

Ok so Ill start with a quick example:
https://i.gyazo.com/8ff58e047c8938dcf508b63bc18147bb.mp4

I start the example with a stationary swing and then proceed to swing while spinning. The station swing is perfect and smooth with zero jittering. The swing while rotating creates a horrible jitter effect.

Right now the character is as follows:
 

  1. Base empty sprite holding everything. This only moves x and y.
  2. Bodyholder sprite is holding the characters body and is child of the base
  3. LeftArmHolder sprite is holding the left arm and is a child of the base
  4. RightArmHolder sprite is holding the right arm and is a child of the base

I have tried a tweening the arm holders, which works well for static swings, but creates jittering while the character spins and swings.

I have tried grabbing the body holders angle and applying the swing angle on top of that (body.angle + requiredSwingAngle). The result is the same as the tween.

I have also tried creating an addition arm holder to act the base for both arms and make it a child of the body holder. The result is the same as the tween.

Does anyone have any ideas on how to create a nice smooth sprite orbiting animation (backwards and forwards) whilst the parent sprite is rotating?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...