Inspect Item ViewportFrame

Hey all! In various games, an example such as Egg Hunt 2018, there was an option to view a 3D model using the mouse to look around in. How would you accomplish this? I have tried using Custom Cameras in a ViewportFrame but nothing has been working and is not close to what I wanted. Any help is appreciated, thanks.

using viewport frames, get the model and position the camera. Then, detect how far the mouse has moved from last frame, (something like this):

local oldmouse, newmouse, mousemoved, cameraCframe = nil, nil, nil, CFrame.new(0, 0, 0)
game.RunService:Connect(function()
     newmouse = --Get the current mouse position
     --I'm not going to do the whole thing, only this part.
     mousemoved = newmouse - oldmouse
     --Then move the camera CFrame dependent on how much the mouse moved
     oldmouse = --Get current mouse position on screen
end)

Note: that script won’t work. It’s just an example.

2 Likes