Skip to Content
Spinning Parts

Spinning Parts

In a weapon, maybe you want barrels that spin, or some other mechanism. For example, a minigun with winding barrels.

To achieve this, you need to do some work in Blockbench and in the gun json.

In Blockbench, you need to create a group with the moving parts inside. To make sure it spins the way you want, be sure to assign the correct pivot point for the group:

Blockbench spinning parts example

In the gun json, you need to write the following code:

"rotations": [ { "phase": "fire", "modelPart": "spinny", "rpm": 300, "acceleration": 3.0, "deceleration": 1 } ]

"phase" here is set to fire, meaning the part will spin when the gun starts the firing phase.

"modelPart" is set to the name of the spinning group.

"rpm” is the speed of the spin, controlling how many rotations per minute the part does per minute.

"acceleration" controls how quickly the part winds up to full spin (defined by rpm).

"deceleration" controls how quickly the part winds down to a stop after the spin is finished (when the player stops firing)

Last updated on