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

Animate/Control an objects position and rotation via text file

Discussion in 'Scripting' started by Footers, Oct 15, 2014.

  1. Footers

    Footers

    Joined:
    Sep 8, 2009
    Posts:
    49
    Hi,
    I've been asked to look into the idea of animating a car via a time stamped text file. I don't yet have the file but it can basically be in any format I require but imagine x, y, z, yaw, pitch, roll inputs every nth second (60hz at most I would have thought). I would imagine these are absolute and not offsets from the previous position but there's no reason why it couldn't be offsets if preferred. I tried searching for something existing for this but have yet to find anything. Can anyone point me in the right direction?
    This would have to be done for several parts of the car assembly i.e. wheels rotating and steering.
    Thanks is advance,
    Andy
     
  2. Zeretyh

    Zeretyh

    Joined:
    Jan 10, 2016
    Posts:
    1
    I am recording position and rotation of Gameobjects in one scene to a CSV file, and in another scene, trying to playback the previous scene by controlling position and rotation of objects with the recorded values in the CSV file.
    The result is not at all what I was expecting.
    Any ideas?