About 20 seconds into gamemode my character starts lagging frames

My snowboarder starts lagging frames or stuttering about 20 seconds into playmode. Checking interpolate just makes him bounce. Any ideas?

Hi,

What do you mean by “checking interpolate”? Could you please share screenshots of what you did and see in Unity? Maybe the problem is caused by the camera. Also share a screenshot of the settings of your Camera component.

Hi Nina,

I read that changing interpolate from non to interpolate would fix it but it made it worse. I get the best result with it set to “none” but the jittering starts eventually.

I’m using a sprite animation as a child to my parent object instead of the snowboarder asset. My spite assets are 16 pixels per unit So it does come out a little rigid. I noticed the jittering starts when my snowboarder hits a sharp kink in the edge colliders spline.

also when I use a 144X92 image for my fill sprite I can’t figure out why it tiles them really tiny instead of like the snow tiling.

Thank you for the help, Nina!

“Interpolate” in the player’s Rigidbody2D component must be set to “Interpolate”.

Regarding the bumps, check the edge collider of the snow. The sprites are more or less irrelevant. The edge collider is supposed to be a smooth line. Maybe give the player more speed in the SurfaceEffector2D component to see if the issues with the “shap kinks” persists.

Regarding the last screenshot, there is a warning messages. Click on the sprite in your assets folder and set the “Tight Mesh” to “Full Rect” as suggested by the message. Then click “Apply”. Maybe that’ll fix certain problems, maybe even problems with the edge collider.

If the problem with the inner tiling persists, duplicate the sprite and increase decrease Pixel Per Unit value for the duplicated sprite. Use the duplicated sprite for the inner tiling.

1 Like

Tried both methods but tile size remains the same

I installed pixel perfect and that seemed to fix the jittering but the tilling problem persists

Maybe test the Pixels Per Unit (PPU) value in the SpriteShapeController component. Also try to tick “World Space UV” to see if the result changes/improves.

https://docs.unity3d.com/Packages/com.unity.2d.spriteshape@3.0/manual/SSController.html

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms