I’m actually working in 2d, but still. Lets say I have a RigidBody and I need this body to “jump” to some position.
I used to deal with it by calling
But this way prevents physics calculations, so if any obstackles is on the way, them wont even slow this body, and I don’t want that.
What MelvMay says is correct - MovePosition does pretty much what you suggest. However if you’re calling it every frame, the perceived effect might be that it is infinitely strong - i.e. can push anything other than static objects out of the way. This would be because you’d be ‘correcting’ the velocity of your object every frame, so it would never stray far from the correct location and ultimately end up nudging anything out of the way to do so.
Its worth noting that ‘MovePosition’ does a little more than you (might?) though it seems unlikely to be part of your problem. It resets the linear velocity of the object before the next fixed update. You could try rolling your own without this functionality. The algorithm is
new_velocity = offset_to_move_by / Time.fixedDeltaTime
Again though, if you do that every frame you’ll ultimately see your object push anything pushable out of the way.