I want to be able to move a wall along a second wall (Plane reference_plane) but I am not able to get the Z scale of the reference wall. Could somebody help? Thanks in advance
public class MoveLayer : MonoBehaviour {
public Plane reference_plane;
private double z;
// Use this for initialization
void Start () {
z = reference_plane...;
}
// Update is called once per frame
void Update () {
}
}
What is the reference wall? What is the Z scale in this context?
If your wall is a standard plane primitive (GameObject->3D Object->Plane) and you’re talking about the Z scale of that GameObject’s Transform that doesn’t make much sense either, as the plane primitive mesh is flat on that plane.
If you want to get the Plane C# Object representation of a plane primitive mesh in the world, you’d get it something like this:
public GameObject planePrimitive;
private Plane abstractPlane;
void Start()
{
abstractPlane = new Plane(-planePrimitive.transform.forward, planePrimitive.transform.position);
}
I want to move a second plan (green) between the begining and end of the reference plane (in your code planePrimitive; blue) in Z direction. I do not now the beginning and end of the planePrimitive.