Question by
rhodes2266 · Aug 09, 2021 at 12:21 PM ·
gameobjectphysics
My game object won’t fall off of the cliff,My Enemies won’t fall off the cliff
I need help, So this is probably a simple fix but I haven’t been able to figure it out. I have an object that has a box collider and a rigid body and it has a script to move forward in straight line . My code is
transform.Translate (0,0, speed* Time.DeltaTime)
My problem is I need this object to fall once it goes over the edge instead the object keeps moving straight ahead floating in the same direction at the same speed. Is there a simple fix for this, I would appreciate all the help I could get, I have been stuck on this problem for far too long.
Comment
Your answer