Plane Problem
Hi i am having a problem, I have attached 2 reference pics here. the problem is, If the Unity Chan came closer to the plane, the plane is going to horizontal. please give some ideas folks.
I'd guess it's being done by the ObjFacecam script. But I suspect we'd need to see that script to provide a better answer. If you disable that script, what happens? What about the Fountain script?
Hi Thanks for the reply @Glurth, Fountain Script is enabling and disabling the fountain. It didn't work out well, so i took it out.
Object facing Camera Script :
using UnityEngine;
using System.Collections;
public class objfacecam : $$anonymous$$onoBehaviour
{
public Transform Trans;
void Update()
{
transform.LookAt (new Vector3(Trans.position.x,transform.position.y,Trans.position.z));
}
}
Now i have found out a solution, I have changed the default plane mesh by another mesh from a project which i worked previously. But i am experiencing another problem, actually wanted that plane to work as a button. i added the button UI, but it didn't work. anyone knows solutions for that?
Rather that use a button, which has a whole bunch of stuff you probably don't need, you could ins$$anonymous$$d use the Get$$anonymous$$ouseDown()/Get$$anonymous$$ouseUp() functions, or better yet, implement the IPointerClickHandler interface in your class. (Also, not sure why your button doesn't work, perhaps it needs to be on a canvas? That stuff always throws me off.)