can anyone help me with my transform.position.
basically i have a wheel which moves forward and brakes and also slows down after time if i let my finger go of the button.
works fine on flat however when i hit a slope it wont stop going backwards when its back on flat.
even if i go forward it will start going backwards again.
im usin
transform.position.x = transform.position.x + speed * Time.deltaTime
to control the transform, using the speed in each if statement to change the way it moves.
i believe what it is doing is when i hit the ramp it is changing the actual position so it then believs that the speed its going backwards is where it needs to stay if u understande what i mean. and then plus the speed to it going backwards.
just need a way to stop this so i can say
if(Input.GetButton(“left”)){
stop this god dam position before i smash my comp;
}