- Home /
Smooth continuous movement with fast updating position
Hi to everyone,
I have a player connected with a localization sensor.
Everything seems to working perfect and the coordinates transfer into unity pretty on time.
The thing is my Player going confused. I use Vector3.MoveForward function and as actual position i put "transform.position" and as target i put the position which i receive from the sensor. All this logic runs into the Update function. Here is the command as i have it into the script "transform.position = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.fixedTime);"
my problem is that this thing does not work properly. i though a couple of different thing to do like creating a path and attach the player to follow it but they don't seem to work proper.
Can someone has experience on this kind of "live" positioning?
P.s. when i adapt the rotation on the player the things becoming way more complicated.
Thanks in advance,
Dimitris