Skip to content

format

typescript
CCDIK.target

class: CCDIK

description

The Transform that is oriented towards the target.

It represents the adjustment of joint angles to bring the end of a bone (or end effector) closer to a target position.

parameter

param_nametypedescription

reture

typedescription
Transform|nullThe Transform that is oriented towards the target.

code example

typescript
let obj = new GameObject();
let CCDIk = obj.AddComponent<CCDIK>(CCDIK);
let targetObj = new GameObject("target");
targetObj.transform.position = new Vector3(5, 5, 5);
com.target = targetObj.transform;
Debug.Log("CCDIK: target position is ", CCDIk.target.position);