en:vci:component:sdk:springbone

VCI SpringBone

VCISpringBone is a component to simulate swingable objects in VCI.

VCISpringBone is based on VRMSpringBone, so it can be setup just like VRMSpringBone. However, you need to use Unity's default SphereCollider for VCISpringBone.

  • To use VCISpringBone, you need VCI v0.25 or later.
  • You cannot preview VCISpringBone on Web preview.

How to implement

Add a VCISpringBone component on a GameObject with a VCIObject attached.

You can export only one VCISpringBone. The use of multiple VCISpringBone is not supported. Also, you cannot attach a VCISpringBone on GameObjects that do not have VCIObject attached.

Parameters

Parameter name Description
Draw Gizmo Whether or not to show gizmo in the editor
Gizmo Color The color of the gizmo
Stiffness Force Hardness of the swingable object (The smaller the value, the harder for the object to return to its original form)
Gravity Power Gravity
Gravity Dir Direction of the gravity
Drag Force Resistance (The smaller the value, the lower the resistance)
Center The center object for the swingable item
Root Bones The list of swingables
Hit Radius The radius for the hit detection
Collider Objects The list of objects which have an effect on swingables

Root Bones

Specifies the GameObject of the swingable item. You can connect child GameObjects on a GameObject. You can set up to 10 GameObjects on a single RootBone. You can add up to 10 RootBones. As a total, you can specify up to 100 GameObjects as swingable objects. The export will fail if there are RootBones in nested state (For instance, a RootBone is attached as a child of another RootBone).

VCISpringBone performs its calculation based on the distance between each object under a RootBone; Therefore, it may not work correctly if the distance between objects is zero or too long.

Collider

Specifies the objects that affect the swingables. On the Collider, you can add GameObjects with SphereColliders attached. Colliders other than SphereCollider is not usable. You can add up to 10 Colliders.

Example data

SpringBone in a curtain-like object. The ball and stick have colliders attached to them so that they can interact with the curtain. Grab the cube above and move to see the curtain waves. In Unity Editor, you can preview the behavior of SpringBone by moving the object in Play mode.

springbonetest.zip

en/vci/component/sdk/springbone.txt · Last modified: 2023/05/11 20:24 by pastatto

Page Tools