How can I access the Unity 5 First Person Controller per script?
Hi, I have a first person controller-variable in one of my scripts. This references the player. Now I want to change variables in the fps- controller script, e.g. the walk/run speed or the mouse look sensitivity. How can I change those per script in the running game (e.g. throught OnTriggerEnter or sth like that). Thanks in advance!
Answer by WoodStick · Feb 06, 2016 at 01:02 PM
I think the problem is that all the variables in the fps script are private (I don't know why). Luckily the fps script is open source, so you can simply change all variables you need to public. Maybe there is a better solution but this worked :)
Your answer
Follow this Question
Related Questions
transform.position not working on phone (Cardboard) 0 Answers
How to make a character controller through another script 0 Answers
Character swap breaks movement. 1 Answer
[Solved] Prevent movement while in the air while keeping momentum. 0 Answers
How do I make player attack with LMB if the enemy is within range? 0 Answers