⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
Socially Expressive Computing Group
All Projects
CADIA
»
Socially Expressive Computing Group
Overview
Activity
Wiki
Files
Download (1.04 KB)
Working with UMA characters
» FinalIKIntegration.cs
Integrate FinalIK to your UMA character on play -
Sabina Huskic
, 2019-03-02 17:06
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
RootMotion
;
// Need to include the RootMotion namespace as well because of the BipedReferences
public
class
FinalIKIntegration
:
MonoBehaviour
{
// Start is called before the first frame update
void
Start
()
{
}
// Update is called once per frame
void
Update
()
{
}
public
void
Integrate
(
UMA
.
UMAData
umaData
)
{
//this adds the FBBIK component to your character
RootMotion
.
FinalIK
.
FullBodyBipedIK
fbbik
=
gameObject
.
AddComponent
<
RootMotion
.
FinalIK
.
FullBodyBipedIK
>();
//this will set the references for your character
BipedReferences
references
=
null
;
BipedReferences
.
AutoDetectReferences
(
ref
references
,
fbbik
.
transform
,
BipedReferences
.
AutoDetectParams
.
Default
);
fbbik
.
SetReferences
(
references
,
null
);
//this will set the orientation of your character's limbs
fbbik
.
solver
.
SetLimbOrientations
(
BipedLimbOrientations
.
UMA
);
}
}
(1-1/1)
Loading...