Hi All,
I am just making an vernier calipers. In that i want to find the length of a cube.
For vernier scale i add the box collider. and x axis moving code.
I just taken a cube and i placed that above of the vernier calipers.
when ever i drag my vernier scale that goes through the cube. how will i fix that?
you can find my vernier scale and cube inspectors.
Add a rigidbody. You are directly changing the position in code and so box colliders will have no effect. Try using a rigidbody and adding force to move them.