- Home /
Why does object lerp to above the object it is lerping to?
I have an object which two other objects lerp to and face. The goal is for the two objects to go to the target object and then disappear when they touch it. One object goes to the object, facing right at it and disappears when it touches it. The other goes above it and sort of slowly circles around it. All of the objects have colliders and the two that are moving are rigidbodies. The scripts for the two moving objects are identical (other than variable names and such). However, they have different models. Also when I line the two objects up at what would seem to be the same height their heights are very different. I use c#
Answer by Owen-Reynolds · Aug 19, 2015 at 03:16 PM
"...have colliders and the two that are moving are rigidbodies."
Active rigidbodies means the physics system is also moving them. It's probably seeing a collision and popping them away. Turn off, or remove the rigidbodies, and check. Usually, moving objects by hand, and telling the Physics system to also move them, will result in weirdness of some sort.
Tried deleting the rigidbodies on both moving objects, but the same exact thing is still happening. Also, to give further information, the objects are kinematic rigidbodies.
Sounds like you're still learning the system (a kinematic rigidbody is turned off.) There's probably some other stuff that you didn't say which is messing you up, or the math is just wrong, etc... .
The standard thing to do is make more tests. $$anonymous$$ove just the problem object, and see if it messes up. $$anonymous$$eep making changes and testing until you find the one thing which causes it. If something isn't working the way it seems it should, read more about it and set up a new scene to test that... .