# Rigidbody travels in opposite direction when kinematic

Why? I am attempting to have what are, at the moment, capsule colliders, travel uphill. When they are kinematic, they go uphill as programmed. When they are non-kinematic, they drift slowly backward and then downhill (they start off on a more or less even plane). Why? I need them to be nonkinematic so that they detect the arrow the player shoots at them.

Here’s the script that’s directing them:

``````#pragma strict

var targetR : Transform;
var effRange : float;
var speed : float;
var canMove : boolean;

function Start ()
{
targetR = GameObject.FindWithTag("whiteElf").transform;
if(gameObject.name == "slowElf(Clone)")
{
speed = 0.25;
}else{
speed = 0.1;
}
effRange = 100.0;
canMove = true;
}
//The script sets the "target" (i.e. the game object which the present object is to follow around) to the white elf. The speed is set at 1.0 units/second.
//The effRange is the effective range within which present game object is to pursue the target. Outside the effective range, the present game object
//shall remain stationary.
//If the present object's name is "slowElf(Clone)", then the speed is lowered, so that it appears to be slower than its partner.

function Update ()
{
if(canMove)
{
transform.LookAt(targetR.transform.position);
transform.position = Vector3.Lerp(transform.position, targetR.position, Time.deltaTime * speed);
}
}
``````

OK, I figured it out on my own, thanks to this link.

Go down to the last entry of the thread, which I will quote in full here:

Hey there,

I ran into a similar situation where I
have a floating object moving from
left to right and vise versa everytime
it hits a wall object.

Both the floating object and wall are
not rigid bodies and have no point of
rigid bodies, but I need collision
detection on both of these, and when
they hit each other. here’s my work
around:

make the floating object a rigid body
with kinematic off, but lock xyz
movement and position so it pretty
much functions like a kinematic or
static colliding object.

Once the capsule colliders became nonkinematic, they registered collisions again with the rigidbody arrows. Because the positions were frozen, they did not slide back down the hill, which for whatever reason, the physics engine must have been causing them to do.