|
Hiya! Just wondering if anyone has managed to successfully control a camera or other free-translating object using a joypad or other numerical input?
I’ve spent the past day trying to get a relational constraint between an Xbox 260 Joypad and any 3d object working - I’ve tried nulls with cameras parented to them and cameras (with no camera interest) both.
I’m passing the input through a Derive operator, as used in the remote controlled car example, and I can control a single axis of the camera no problem. However, I cannot, for the life of me, get the results I want when I hook both pitch and yaw (Y and Z) rotation up.
What I’m aiming to achieve is to have the pitch function relative to the direction the camera is facing - tilt up and down, in other words - whilst the yaw functions relative to the global axis. Just like a first-person shooter or indeed how you’d mostly use a real world camera.
However, when using the simplest setup (numbers hooked straight to a number-to-vector operator, which hooks to a Derive operator, which goes to the object’s Rotation property) I get all sorts of odd behaviour. Most commonly I’m seeing the Y pivoting about the object’s axis, whilst the Z always rotates around the world axis - exactly the opposite to the behaviour I need! I’ve tried setting the constrained object to both local and global rotations, but the behaviour seems to be identical in either.
I’m afraid I don’t have an example file here, because I just deleted the last one in frustration! Can anyone explain roughly how I should go about this setup, though? I’m sure there’s something obvious I’m missing.
|