|
Using this function I have been able to make an object float to a destined position, how ever, should this object come to a wall or any object that has a greater mass than it, there is no proper collison and it knocks the other object away or goes right through it. how can i tell this object not to go through others or push over others during this procedure. all object have colliders that work.
Thanks a ton!!
(comments are locked)
|
|
That problem happens because explicitly setting the position overrides the Physics on the object. Like Eric said, you want to add a rigidbody and apply forces or you can even try toying with its velocity a bit. From my comment @Eric5h5 I meant it will be no easy work if this object actually need to do anything else than "float to a destination point" like stop on it, or bring something along. If it's just reaching it, then just use AddForce rather than the Lerp. It will throw the object and physics will do the rest. Try it, you will see. ;) It works great! thanks!
Feb 20 '10 at 09:00 PM
Yisreal
Glad to know that. ;)
Feb 24 '10 at 12:03 AM
Cawas
(comments are locked)
|
