i recently got unity 3D and i have started making a game consisting of 2 cubes trying to knock each other off the arena. i am having some trouble with making the cube detect collision with the plane underneath the arena which i want it to make the cube re spawn when ever it touches it.
i have done this so far:
using UnityEngine;
using System.Collections;
public class plz : MonoBehaviour
{
void OnCollisionEnter(Collision col)
{
if (col.gameObject.name == "Death")
{
transform.localposition = new Vector3 (10.56507f, -13.15086f, 9.080673f);
}
}
}
PLEASE HELP!!
What exactly isn't working? Also, please place the code in correct formatting.
– Namey5Hi, yes, gladly: 1. Version of WordPress is 4.9. 2. Version of Unity that I built my games were: 2017.2.0, 5.6.0, 5.5.1, 5.0.3 3. Release build, WebGL build of course 4. Yes they seem to work, but the Roll-A-Ball_5.5.1 doesn't work Anyways I ended up needing to iFrame the game, but would still be very interested in using your plugin
– Deadshot1994