Hey everyone, hopefully someone can point me in the right direction for scripting my player movement.
Essentially, Player is at location A, and can choose B C D, which all require to reach a certain number count, so lets say he chooses B, the player should move towards B, distance covered based on steps (540/1000 is just over half way there)
Im aiming to use the pedometer in phones for this, but I just cant wrap my head around how ill have the player object move across the map as the number gets closer to the required number, even a basic idea of this will help me figure it out.
I do not know if you have a map or you just use euclidean distances, In both case you have to calculate the distance. In euclidean distance you can calculate distance like this:
distance = A - B. This is the distance you have to cover in 540 steps so each step should cover
distance/540 units to target. We can also formalize it like this:
A.transform.position += distance/540 * Time.deltaTime
@turnertodd59 Let me know if this is not what you want. Good luck
hi can someone help me I need to decompile the apk of an app I just built but I deleted the project and I need to get back at least to get the scripts back