Actually, you do indeed get some spikes when moving colliders via transform instead of rigidbody.MovePosition(). At least from my profile tests. There's a physics "UpdateTransform" (or something like that, I don't recall exactly) call that is expensive (relatively speaking) that doesn't happen if you move via rigidbody. This is regardless if the collider is a trigger or not.
That said, you probably wouldn't notice anything unless you had a ton at once.
thanks, i have read a couple of forums and articles about this, since then i changed my code and now uses rigidbody2D.MovePosition i even made my tests with a loop of 30.000 iterations and saw the differences , thats all ok for the rigid body in the main GO, but in my hero i have different colliders as children and depending he is walking or crouch or he is KO i need to change shape or at least move the children colliders
even if it is not noticeable cause very few colliders to be altered, i am worried about the garbage collection , i am rewriting my code to avoid the GC collect call that happens sometimes and in my game, for unknown reason is making a huge spike.
im not expert so i don't know how to read the profiler information exactly but seems that the garbage is generated cause 59 calls that change collider transform in my player script ...? is that correct?
i need to clean this as i plan to use the same script for other 20 or 30 characters in the game all running at once...