2 d scene, two objects a and b are the same (Y) on the ground, look a little b large, from a to b a certain position to climb,
The current plan:
Hanging on a script sa, a List< in sa; Transform> The path variable, add a few empty child objects on b, drag and place of the path ahead of time,
Drag the several empty object directly to the path, in the start climbing is also set to b child objects, sa mobile handling code is: the transform. The position=
Vector3. MoveTowards (transform. The position, the path [currentPosIndex], m_ClimbingSpeed * Time deltaTime), the current problem is at
Collection device testing, around quickly drag b object in the Scene Scene, is a object will deviate from b, the x axis deviation is large,
Question:
The plan have what problem or what is the better way?
CodePudding user response:
Path does not Transform, or did you played. In this little position