Sonic Mega Collection Plus contains no "lock-on" technology. That mechanic—targeting enemies/objects in 3D—doesn't exist in these 2D platformers.
If you're thinking of a different feature or game, let me know and I'll clarify.