Hi All,
So what I need to be happening in my game is when the player flies through a cloud, their fuel is decreased at an increased rate throughout the time that they are touching/inside of the cloud.
I have it detecting the collision between the player and the cloud, but it physically effects the player by throwing them off course (basically turns the clouds into rocks and the player glitches through them and is thrown out in a random direction…
). Ive attached the screenshots on how I have the colliders set up below.
Is there a way to constantly detect a collision but not physically effect the player?
Script:
void OnCollisionStay (Collision test)
{
if (test.gameObject.tag == "Cloud")
{
PlayerControls.fuel = Mathf.MoveTowards (PlayerControls.fuel, 0, Time.fixedDeltaTime * 2);
Debug.Log ("Cloud Contact");
}
}
Thanks! ![]()

