Unity. Problem with collision.

Hello programmers, first of all I want to apologise for my english, because I don’t speek this language very well.

I am new to the community, I have some C++ practice and made some simple games in PHP.

I really need help. Here is my problem:

I created a Player.

I do not added Rigidbody.

I want to make collisions without Rigidboby, and don’t use physics.

I decided to use Character Controller for the player and isTriggered on cube.

I am using void OnTriggerEnter(Collider other){} function to detect trigger collision.

It is working.

But…

What code I should type in the function OnTriggerEnter, to make player move back when collision happend?

I tried few solutions, like some code with Vector3, transform.position, but nothing seems to work with my problem, everytime my player passes through the object.

Thank you for your help and time. B.alt text

A tip: Never post screenshot of code rather paste in code sample.

Assuming you only have this script attached to the player(Character controller).\

void OnTriggerEnter(Collider other){
this.transform.position = new Vector3(0f, 0f, -1f);

I didn’t test the script and haven’t opened Unity for 2 years.
Try playing around the parameters this should work.
You should also clarify what do you mean by move back?