Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tracking the "Y" value

Discussion in 'Scripting' started by Velketor, Apr 3, 2008.

  1. Velketor

    Velketor

    Joined:
    Sep 15, 2007
    Posts:
    110
    Hello,

    I'd like to use a script that tells me the "Y" value of my character controller at any given time. This "Y" value will then be used with MAX MSP to raise or lower a treadmill based on the Y-Value of my game character.

    Let me know if you guys know how to do this! Thanks!

    --Velk
     
  2. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    You can find the Y value of any GameObject by asking it for "gameObjectName.transform.y".
     
  3. Velketor

    Velketor

    Joined:
    Sep 15, 2007
    Posts:
    110
    Thank you so much! That is perfect =)

    --Velk