- Home /
Slow down player (2d) when in contact with object
Hi im trying to make the player slower when they come into contact with an object. My moveForce was public but if switched it to private and added an if statement in the update of my playerControl script. This is my first time experimenting with unity and would appreciate any and all feedback thank you
if ("Trough" == tag) moveForce = 35f;
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613135814im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Variable value persists when public but is lost between frames when private 1 Answer
2D Animation does not start 1 Answer
Has anyone had success with Facebook's graph API in Unity's Flash export? 1 Answer
Explanation on how to use functions, variables from other files 1 Answer
How can I make the animation events window stop showing private functions? 0 Answers