Answer by KubaPrusak
Have you seen what happens when you spawn the gameobject at tiny bit above the "obj" gameobject eg 0.0001 I think it doesnt detect the first enter because you instantiated it inside another gameobject.
View ArticleAnswer by KubaPrusak
I believe you need to check something like this : if (Physics.Raycast(ray, out hit)) { if (hit.collider.name == "name) { I am not sure but thats all ive got
View ArticleAnswer by KubaPrusak
If you want the object to face the player you can use transform.LookAt(Transform target, Vector3 worldUp) where target would be the player Camera. worldUp is an optional parameter but you should set it...
View ArticleAnswer by KubaPrusak
Your button has by default a Button Script. At the bottom of this component there is an OnClick(). You have to create a script and attach it to any gameobject so that it is running. In that custom...
View ArticleAnswer by KubaPrusak
To keep the footsteps in the correct direction, when you instantiate them make them face in the transform.forward direction of the player. I presume that the character controller that comes w/ unity...
View ArticleAnswer by KubaPrusak
I assume you are generating these tiles at startup (void Start()). This uses a lot of CPU which is making you wait. If you are then there is no way to make the process faster. You would have to...
View ArticleAnswer by KubaPrusak
Technically if you add the same components to the UI (ie. colliders etc.) and remove components such as Button script then it would work. The only problem is that UI components have a UIPosition thingy...
View ArticleAnswer by KubaPrusak
In the modeling program there should be an option to join multiple meshes into one. At runtime you can use mesh.CombineMeshes() to combine multiple meshes into one.
View ArticleAnswer by KubaPrusak
You can create a 2d array that will hold a number. Then you go through the array and depending on the number it has you instantiate a different tile prefab with the 2d array coordinates for example...
View ArticleAnswer by KubaPrusak
You can fill the camera view with textures of a grid that tessellate. Then you can use this function OnBecameInvisible() [Documentation Link][1] to see when the object goes outside the screen. When it...
View ArticleAnswer by KubaPrusak
I figured out a solution. Basically each wall piece has two Nodes, one for the starting point and one for the ending point of the wall. I then run an a* pathfinding algorithm where the start point and...
View Article