Can the same thing be done in Scratch 3? The short answer is yes, but it is done slightly differently.
The first change the video capture is not there in the blocks automatically; but is an extension that needs to be added. First, you need to add the extension blocks for video sensing. Go to the little icon at the bottom left of the screen (as shown below) this takes you to the extensions menu.
Next, find the Video Sensing option and selected. The webcam, if enabled, with start automatically.
A video sensing set of blocks is now in the list of block options.
The rest is very similar to doing this in Scratch 2.
Moving Scratch: The code below moves the cat backwards and forwards depending on whether the object is moving left to right on the screen, or not.
The code is available at https://scratch.mit.edu/projects/276892758/ please feel free to improve it and let me know.
All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon