- Home /
Question by
timothyokh2422 · Apr 04, 2021 at 04:47 PM ·
movementz-axisx-axis
How to make a object follow another on only 2 axises?
So basically I want object 2 to be as if its parented to object 1 but only move on the x and z axises of object 1. So I tried using something similar to transform.position.x = objectOne.transform.position.x; and after that transform.position.y = objectOne.transform.position.y;...................but nothing that I tried worked......please help.....and sorry I'm not able to screen shot my C# code.
Comment
Answer by timothyokh2422 · Apr 04, 2021 at 06:03 PM
Oh sry......I meant objectOne.transform.position.z not y
Your answer
Follow this Question
Related Questions
How to create a knockback that works for 2D ? 2 Answers
z-axis movement 1 Answer
Spawn point movement problem 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers