void Start() { doorLeft.SetMovingType(Actuator.MovingType.MoveTowards); doorLeft.SetMaxSpeed(speed); doorLeft.SetDirection(Vector3.forward); doorLeft.SetMaxOffset(openOffset); doorLeft.SetMinOffset(0); doorRight.SetMovingType(Actuator.MovingType.MoveTowards); doorRight.SetMaxSpeed(speed); doorRight.SetDirection(Vector3.back); doorRight.SetMaxOffset(openOffset); doorRight.SetMinOffset(0); }
void Start() { rootModelTransform = rootModel.transform; lift.SetTarget(transform); lift.SetInitialPose(transform.localPosition); lift.SetMovingType(Actuator.MovingType.SmoothDamp); lift.SetMaxSpeed(speed); lift.SetDirection(Vector3.up); lift.SetMaxOffset(MAX_HEIGHT); lift.SetMinOffset(MIN_HEIGHT); // Debug.Log(name + "::" + speed); FindFloorRegionInLift(); UpdateTopModels(); }