Flying camera - rotation

I cannot for the life of me work out how to do what seems like the most basic operation - adjust tx, ty, tz and rx ry rz to fly a camera. Every combination of translation order, pivot whatever doesn’t get me that most basic operation - rotate around the objects current center, and move relative to the direction I’m looking.

The closest I’ve got:
Rotate Scale Translate
txyz and rxyz wired up
Pivot x y z as negative txyz

Even now a rotation seems to move the camera a lot.

What’s the magic setup? I’m going to share a half decent SpaceNavigator component when it’s done.


Hey Bruce the SpacePilot comp that I posted a while ago has it. As well as the first person cam Ben posted.

I remember you and another user had a problem with my SPP component. A roommate of mine had the same problem last year which we figured out. It seems all the 3d Connexion devices output an instantaneous value when the controller is moved. 0 - 1 and then will fall back to .5 when not touched. The Space Navigator (not the wireless) on the other hand outputs a continuous stream of values that just add or subtract from previous value, which I’m sure you know if you have one. If you want to check out the component that I uploaded a while ago you can just insert a slope chop right after the joystick CHOP and then delete the existing math CHOP that zero’s the rest value. So your rest value is now zero.

To set it up you need to accumulate transformations. The object CHOP does this by using a Reference COMP and a Target COMP. The values coming from the controller need to be setting the targets position then the difference between the reference and the target needs to set the parent of the target’s position.

Rather than find that old comp I just uploaded the core comp doing what I just described. It should be relatively easy to get the SpaceNav using it although it might require scaling, flipping and swapping the axis to get the desired directions. You can export out1 to your cam or just use it’s cam1 for your render.

FlyCamExample.toe (6.05 KB)

Yes, thanks, I’ve been looking at your version as I make one. It’s a little heavy weight for me - I want something simpler, and need some different features.

But I still have that core problem - that I can’t just ‘fly’ in the direction I’m pointing and also rotate without also moving a fair amount.

I’ll post my component so far tomorrow. I’d be much obliged if you can point to the problem. It’s really close in basic functionality.


For sure! I’d be happy to take a look.


This is my current attempt. Fairly usable. Any tips appreciated!

SpaceNav.tox (3.86 KB)

Here’s a few changes for you Bruce. I put a few notes inside to explain what is happening, but a lot of the work is being done by the object CHOP. Without it we would need to do our own matrix multiplications in order to do the to coordinate space transformations. World space XYZ = horizontal,vertical,depth to local camera/viewpoint space XYZ = left/right, up/down, forward/backward.

hope it works for you!
SpaceNav.toe (9.25 KB)

1 Like

You cannot imagine my delight when after a couple of evenings spent trying to figure out the same thing that Keith was trying, I decided to ask for help, logged in the forum and found not only the same question (thanks Keith) but also answers I can understand!

Thanks to all!


Thanks Keith. I’ll work some of that in. It was great of you to turn that right back around.

It all seems a bit convoluted for a very core functionality… I’m going to feature request some of this be rolled into the camera.


I agree - it’s a pretty basic behavior that should be in the camera component. I can see quite a few folks having to implement it otherwise in their apps.

did anyone make this work with the camera rotating around a pivot instead of at the origin?

I can make it rotate around 0,0,0 no matter where I translate it (basically using the negative of the parent translation as a pivot in the camera), but not an arbitrary location (it seems the translations add up incrementally in the parent as I keep rotating around an arbitrary point).

attached is a movie to show - from a different software - what I’m looking for - in this movie’s case the pivot is always in front of the camera somewhere no matter where I translate the camera, and the cam rotates around it.

maybe because it’s 3 am… but I can’t duplicate this behavior… :slight_smile: (5.42 MB)

The way I’ve used it in the past is to create a switch to switch between the accumulate transform method above and another network.

The rotate around the pivot network I usually just use a speed CHOP and the tz rx ry values (with SpaceNav you can skip on the slope and the speed CHOP). Then I’ll export the tz to translate Z on the main transform page and then rx and ry to the Rotate X/Y on the Pre Transform page. You can then export to Pre t[xyz] to move your pivot point. It can also be done just on the transform page by exporting the polar opposite transform to the pivot (ie tz = 250 pz = -250) I just found it easier to use the Pre for rotation and skip on the extra exports and the math to specify an absolute pivot point.

I just tried making it work with the accumulate method above but it seems to be a little tricky. It would be cool to have though because then you can have a camera like the 3dConnexion Maya camera that will rotate around the center of interest easily while at the same time be able to look in other directions.

I’ll give it a shot this weekend.

Hey I think I got it working.

see attached toe file. It’s pretty simple - it’s all in setting up cam and parent correctly

view /project1/CAMERA_VIEW to rotate/translate the noisy sphere using the mouse (lt-rot mid-zoom rt-xytrans).

instead of the mouse you can use anything (just change the input of /project1/CAMERA_VIEW/Channels to be whatever provider of incremental T[xyz] R[xyz] you want)

pressing ‘h’ on the keyboard while inside the viewed panel also resets the view to the values in the Home DAT.

Last, to change the pivot location just change translation of PIVOT

let me know if it works - seem to do what I wanted it to do.
camNav.toe (12.4 KB)

Hello everyboby. I get stuck so need a little help.
On [FLYING ROCK_fixed.toe] what we see is cam1 going around geo1. But how can we see and save out, not the scene of cam 1 rotating around geo1, but what cam1 in seeing during it’s rotating around geo1. the question is how to get a subjective viewer when rotating with cam1 around geo1? Hope this make sense. Regards, FLYING ROCK_fixed.toe (6.3 KB)

hey Destroboy, for the next time probably best if you post your new question in a new topic instead of resurrecting a 6 year old thread,as this thread was about another topic than your question. Makes it easier for people in the future to search&find answers.

Anyway back to your question: in the example you provided, in your Render TOP you already see what cam1 is filming. Attach a Movie File Out TOP to the Render TOP and save it as a movie file. Does that answer your question?

Hello Nettoyeur. It’s not a 6 years old topic, don’t know from were you get that idea. It has only 1month, but as Ben, who was helping me with it on another discussion did not reply to me anymore, I change to see if I can get a reply from some other. So thanks for your help. I will try your suggestion and tell you how it was.

hmm then the forum is playing tricks - this is what I see, last message in this thread before you posted was from Oct 2014:

Can be. Now I see that my post figures as a 5 years later… Strange. I post my query on this discussion becasue it was the only one I found related to my issue. Didn’t know that it’s not recomendable to post new post on an old discussion. Nor is it that I have looked at the date of this discussion earlier. I initiate this discussion on another 1 month ago.

I tried your suggestion but nothing appear on the Movie File Out and no mov can be saved. TOP.FLYING ROCK_fixed.1.toe (6.3 KB)

Did you enable the record parameter on the Movie File Out TOP?

Now it worked. Thanks for the tip Eric. I learned a new thing! But it isn’t really what I am looking for. I recorded the same set I see on the render view. What I need to accomplish is different. And I must see it first on the render. And is not a fixed camera filming all the geometry of the rotating object, which is ok. I need to record a rotating travelling, I mean that the viewer moves along with the camera in the space, as in 3 D, and can watch the rotating object as he and the camera were flying. Hope you understand what I mean. Maybe with Touchdesigner you cant do that. I have a clip sample to show this, but only can send it to youe email. Thanks in advance for any new suggestion.