Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels

Channel Catalog

Channel Description:

The latest answers by "IvovdMarel"

older | 1 | .... | 5 | 6 | (Page 7)

    0 0
  • 08/13/18--02:08: Answer by IvovdMarel
  • Is Container[0] referencing the prefab? If you don't Instantiate the object, the Start function will never run on it.

    0 0
  • 08/13/18--02:10: Answer by IvovdMarel
  • The easiest way to have the camera follow the position and rotation of another object is to make it a child of that object. If you really only want to follow the rotation and add an offset I would go for transform.rotation = player.transform.rotation + Quaternion.Euler(45,0,0);

    0 0
  • 09/12/18--07:16: Answer by IvovdMarel
  • You can just look at the source-file at the bottom but probably worth checking out the video

    0 0
  • 09/19/18--11:20: Answer by IvovdMarel
  • A common mistake of the 'while' loop. Anything that you put in while will infinitely repeat until the condition is no longer true. This is very different then putting something in Update, which checks every frame, but just once. In your case, Input.GetMouseButton(0) is true in one frame, and then the while loop runs infinitely in a single frame (until Unity crashes) since there's no condition for it to leave that while loop. Try this: if (Input.GetMouseButton(0)) { RaycastHit hit; Ray ray; #if UNITY_EDITOR ray = Camera.main.ScreenPointToRay(Input.mousePosition); #elif (UNITY_ANDROID || UNITY_IPHONE || UNITY_WP8) ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position); #endif if (Physics.Raycast(ray, out hit)) { endPoint = hit.point; Debug.Log(endPoint); } rb2d.AddForce(endPoint * speed); }

    0 0
  • 09/19/18--11:22: Answer by IvovdMarel
  • You should (almost) never change the z-value of UI elements. To order, change the hierarchy in Unity. In this case, it seems like the blue background is actually part of the button. Therefore, when duplicated, it will be rendered on top of any other buttons after it in the hierarchy. To avoid other rendering issues, also make sure the z-value of all elements is 0.

older | 1 | .... | 5 | 6 | (Page 7)