floating enemies

Ive put enemies into my FPS game but they have a tendency to float rather than remain stuck to the floor. does anyone have an idea as to why this happens and possibly how to solve it?

Thanks

Do they have a rigidbody attached to them, so they’re affected by the physics engine?

they werent, but i just tried that and now they dont move smoothly, they shake etc. and one did still float slightly

What other components (and any significant properties you changed) do you have attached to the prefab?

well theres a box collider, not sure if that would have any bearing on it, but beside that i cant see anything which may have an effect, i cant see world positioning or anything like that having a dramtic effect

Hmmm, how are you moving the enemy? Directly by its position?

its using the same waypoint system as used in the FPS tutorial on this site. by the way, im a bit of a unity novice so if anything i say doesnt quite make sense or if i dont quite get waht u mean forgive me!

Have you verified that your box collider isn’t “too big”? Perhaps your collider is a little larger than the models being used and as such the model appears to float but the collider does not. This might also describe some shaking as the collider is contacting surfaces that you don’t expect.

no i dont think its that, if your suggesting what i think you suggesting the enemies would be constant in their height, in this case it varies, they go up and down with no real consistency, even to the extent that when you sometimes play a level they run pretty much fine, then others they are all over the place. do you think that way points could have some bearing upon it?

problem sloved, removed the box collider all together and it seems fine, such a simple solution, the box colliders were left over from an older version of the enemies when they were simple cubes which shot at the FPS. sorry if it seems like ive been and idiot not to do this. thanks for your help though!