public void PublishReading(BGBodyReading reading, IBGBodyTracker tracker) { if (tracker != currentTracker) { print ("Warning: PublishReading cannot be called from a IBGBodyTracker who is not the current tracker."); return; } foreach (IBGBodyReadingListener listener in listeners) { listener.HandleReading (reading); } }
public void HandleReading(BGBodyReading reading) { //print ("HI"); //there is a reading generated for each player id each camera frame, check that we're reading the right one. if(player == reading.GetPlayer()){ //move based on the reading values! transform.position = startPosition + new Vector3(reading.GetX()*10.0f, reading.GetY()*10.0f, 0.0f); //transform.localRotation = Quaternion.Euler(new Vector3(0, 0, reading.GetTilt()*Mathf.Rad2Deg)); currentScale = startScale * reading.GetScale() * 2.0f; } }
public void PublishReading(BGBodyReading reading, IBGBodyTracker tracker) { if (tracker != currentTracker) { print("Warning: PublishReading cannot be called from a IBGBodyTracker who is not the current tracker."); return; } foreach (IBGBodyReadingListener listener in listeners) { listener.HandleReading(reading); } }
public void HandleReading(BGBodyReading reading) { if(player == reading.GetPlayer()){ //first look at the camera, then apply our rotations transform.LookAt(cameraTransform.position * -1.0f); transform.position = startPosition + new Vector3(reading.GetX()*100.0f, reading.GetY()*100.0f, 0.0f); transform.localRotation = Quaternion.Euler(new Vector3( transform.localRotation.eulerAngles.x, transform.localRotation.eulerAngles.y, -reading.GetTilt()*Mathf.Rad2Deg )); transform.localScale = startScale * (reading.GetScale() + 0.3f) * 4.0f; } }
public void HandleReading(BGBodyReading reading) { if (player == reading.GetPlayer()) { //first look at the camera, then apply our rotations transform.LookAt(cameraTransform.position * -1.0f); transform.position = startPosition + new Vector3(reading.GetX() * 100.0f, reading.GetY() * 100.0f, 0.0f); transform.localRotation = Quaternion.Euler(new Vector3( transform.localRotation.eulerAngles.x, transform.localRotation.eulerAngles.y, -reading.GetTilt() * Mathf.Rad2Deg )); transform.localScale = startScale * (reading.GetScale() + 0.3f) * 4.0f; } }
public void BodyPositionReading(string message) { BGBodyReading reading = new BGBodyReading(message); owner.PublishReading(reading, this); }
public void BodyPositionReading (string message) { BGBodyReading reading = new BGBodyReading (message); owner.PublishReading (reading, this); }