Skip to content

Pack Making JSON Animated Objects

DonBruce64 edited this page Dec 31, 2022 · 4 revisions

Animated objects are the most complex part of rendering and will likely result in a few pack reloads before you get them right. However, they are a powerful system that allows any type of rotation, including multi-axis for things like driveshafts and steering assemblies. The animatedObjects JSON section is located in the [[rendering|Pack Making JSON Rendering] section of JSONs, and is composed of a few main fields, plus a listing of one or more animations to apply on the object. Objects require no special naming in the model, though some objects may require special names to work with other systems. For example, a translucent object would have to include the translucent keyword in the name, but could also be specified in this section to rotate it. The following parameters exist for all animated objects:

  • objectName – The name of the object in the model this definition will act on.
  • applyAfter – If set, this object's animations will be applied directly after the listed object. This allows for complex animations, and saves on duplicate JSON where you want to “attach” one object to another and have them move together. Note that this does NOT work with animations applied to things other than model objects, such as part movement.
  • blendedAnimations - If set, this object will do blending with visibility animations rather than being invisible or visible. Blending clamps such that visibility below min is invisible, and visibility above max is visible.
  • animations – A listing of one or more animations.
Clone this wiki locally