Jump to content

Recommended Posts

Posted

I want a model with a permanently rotating thing. I tried this:

		{
			"name": "Gear rotation",
			"code": "gearrotation",
			"quantityframes": 60,
			"onActivityStopped": "Rewind",
			"onAnimationEnd": "Repeat",
			"keyframes": [
				{
					"frame": 0,
					"elements": {
						"Gear": { "rotationX": 0.0, "rotationY": 0.0, "rotationZ": 0.0 }
					}
				},
				{
					"frame": 59,
					"elements": {
						"Gear": { "rotationX": 0.0, "rotationY": -87.5, "rotationZ": 0 }
					}
				}
			]
		}

But this produces very ugly jitter at the end of the animation, since it rotates all the way back. I checked some survival mod code to see how entities like quern do it, and it involves a ton of code including custom rendering which I really don't want to copy. For now I'll just bump the number of animation frames to something huge and call it a day, but is there a better way?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.