- Home /
third/first person controller stop work
Hey, I'm new to Unity,I'm trying to make a first/third person controller.I have a script which updating the 3rd/1st person controller position.The problem is that after updating the position of the 1st/3rd person controller i can't move it using keyboard arrows.It stuck and stop moving.My position edit code is:
tpc=GameObject.Find("/TPC");
tpc.transform.position =GOcurrentApart.transform.position;
where GOcurrentApart is a gameobject Cube.This also happen when i apply it to my 1st person controller does any one know why this happened and how to fix it?! thx
Answer by Magso · Feb 12, 2014 at 06:26 PM
This might work in the update function:
while (true) {
tpc.transform.position =GOcurrentApart.transform.position;
}
if it doesn't then it might be that you're only giving it one position to go to because there's no transform.Translate so it will stay in the specified position.
I think you didn't understood my problem. when the code i posted executed the character move to the specific location,but after that i can't move it using the arrow key (controller) it stucks at that position .
Is this on one of the standard assests controllers or are you making your own?
Your answer
Follow this Question
Related Questions
Using first and third person prefabs together. 0 Answers
Changing the camera from first person to third person. 1 Answer
Boolean check not referenced correctly from other script 2 Answers
first person with animation. 1 Answer
How to keep player moving in the same direction after camera change 1 Answer