public void FloatWithArm()
{
KinectInterop.JointType handJoint = KinectInterop.JointType.HandRight;
KinectInterop.JointType shoulderJoint = KinectInterop.JointType.ShoulderRight;
KinectManager manager = KinectManager.Instance;
if (manager && manager.IsInitialized())
{
if (manager.IsUserDetected())
{
long userId = manager.GetPrimaryUserID();
Vector3 handPos, shoulderPos;
if (manager.IsJointTracked(userId, (int)shoulderJoint))
{
shoulderPos = manager.GetJointPosition(userId, (int)shoulderJoint);
if (manager.IsJointTracked(userId, (int)handJoint))
{
handPos = manager.GetJointPosition(userId, (int)handJoint);
armEffect = new Vector3(-3 * (handPos.x - shoulderPos.x), 3 * (handPos.y - shoulderPos.y), -3 * (handPos.z - shoulderPos.z));
ParticleSystem.VelocityOverLifetimeModule module = particle.velocityOverLifetime;
}
}
}
}
}