ViewCamera: No overload for method

I am following a video tutorial on how to control the camera from Grasshopper in order to create a fly-through animation: Control and Animate the Camera with 6 lines of code GH Python Rhino 7 - Beginners Tutorial - 002

Unfortunately, I get an error message when trying to set the camera. Here is a simplified example:


2025-06-05+02_no_overload.gh (6.8 KB)

How do I make that work in Rhino 8’s Grasshopper?

If there is an alternative way to control the camera, I should be fine with that too, as long as it doesn’t require plugins. The traditional non-Grasshopper way of doing fly-through animations fails for me. See my recent posts in the thread: Parts of Rhino Model Disappear During Flythrough Animation.

cameraScriptManipulation_1.gh (11.6 KB)

but it behaves strange…

better.. sorry
cameraScriptManipulation_2.gh (12.7 KB)

Works fine without it through, thanks.

Box 2Pt and Populate 3D are also needless distractions:

Haven’t watched the video yet but this looks promising.

:upside_down_face:
the needless distractions generate a chnaging point to test the script by changing the Seed.
the Scrip node does not need its outputs…

Thank you, that pointed me in the right direction!

Here is what I have now:


2025-06-05+02_no_overload_fixed.gh (6.4 KB)

The conversion on line number 4 would not be necessary with a type hint in the input parameters. But I prefer to have it all in code for this example.

But… when the slider is moved, the geometry quickly moves out of the “viewport”. I’m aware of this other “camera view” thread:

But am still waiting for working code that moves a camera along an arbitrary curve while pointing at a target point? And then being able to smoothly change the target, of course. :smiling_face_with_sunglasses:

P.S. I did some of this ~3 years ago using the Horster cameraControl plugin and a trial version of Bongo (US$ 995 to buy!), but would like to have a “simple” way to create fly-through animations.

Similar to this, done with Bongo but difficult, as I recall (and expensive to buy!).

As explained in the video, you can even move the target point. Because I need that too, I just created a simple example whereby the camera location and the target are moved along two circles:


2025-06-05+02_with_target.gh (16.6 KB)

Python code:

import rhinoscriptsyntax as rs
import Rhino

location = rs.PointCoordinates(location)
target = rs.PointCoordinates(target)
viewport = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport
viewport.SetCameraLocations(target, location)

Yes, thanks, that’s better. I changed the camera path and target to create this:

camera_path_2025Jun5a
camera_path_2025Jun5a.gh (22.0 KB)

Certainly a nicer path than in my example! By the way, when using type hints, then the code can be reduced to just two lines:

import Rhino
Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport.SetCameraLocations(target, location)

That’s a third of what is advertised in the aforementioned video. Not that it matters. Anyhow, animating with Grasshopper is fun. I can put off purchasing Bongo 2, which doesn’t have the best reputation.