I’m trying to implement some wind “forces”, but I’m not using rigidbodys, so I thought this code could work, but sometimes the player goes with the wind flow and sometimes doesn’t. Could anyone help me with this?
function Awake(){
winddir = transform.TransformDirection (-Vector3.right);
}
function Windy(){
Player.Translate(winddir*windforce * Time.deltaTime,Space.Self);
}
This code is applied on a trigger box collider, with particles on it, so I pretend to get the direction of that box and then traslate the player in that direction with a “windforce”