Hi.
I have code with detection player collider with another blocks. In previous project and version of unity this me working.
I using for detection this method: void OnControllerColliderHit(ControllerColliderHit collision)
I have also Debug.Log for debuging, if the collider detection working. But if i insert into this method these code, nothing happaned:
transform.position = new Vector3 (0, 0, 0);
I am tryed another method like another coordinates, GameObject.transform.position atc.
In previous project working this correctly but now it not working. For detection with another object i using these:
if (collision.gameObject.name == “Dropp”)
Another interested thing is, when i place piece of the code with the transform.position… in the another part of the code, it works perfect. Any case when this is not working is in my method with detection.
Do i anything wrong? If i do anything wrong, why it is worked in previous version and another project?
After all what i tryed i reported it as bug to unity, because it not working only in my code. The unity helpers writed me back. The problem is, when i tryed change the position player, the player has own update method with teleport him at the same coordinates. Only what is need to do is disable it. If i understant it correctly.
Here is example of my worked code which working thanks to unity helpers. Thanks !