Game Development Community

1.5.2 Orbit Camera Bug

by Ronald J Nelson · in Torque Game Engine · 05/15/2007 (3:08 pm) · 10 replies

This little update kills orbit cam settings I have been using for a while now. Not sure if it is a bug or not, but seems to be since the old code (1.5.1) worked like a champ.

So I did a little piece by piece test with the updates to camera.cc. First, switch it back to the 1.5.1 file and it works again. So I knew it wasn't just me losing my mind (well maybe).

It turns out it doesn't like this little change at line 124:

getRenderEyeTransform(mat);

Change it back to:

getEyeTransform(mat);

Then it all works well again.

#1
05/16/2007 (8:37 pm)
Hmm nobody else gets this problem?
#2
05/17/2007 (8:29 am)
I haven't seen it, personally, but it's the type of bug someone talks about every blue moon. I have no idea if it ever got fixed, if it fell thru the cracks or if something else broke it this time.

Of course a forum search revealed nothing to me, but I'm sure I've got a bookmark about it somewhere.
#3
05/17/2007 (11:24 am)
Would you be more descriptive as to what "kills orbit cam settings" means?

The change was made due to orbit cam jitter during death as far as I am aware, but if it impacted something else we aren't aware of it.
#4
05/17/2007 (2:26 pm)
Certainly Stephen. I meant adjustments to the location the camera is placed in respect to the object transform fails. It stays at the transform point.

This is what I used in the script that worked previously.

%this.camera.setOrbitMode(%this.vehicle, %this.vehicle.getTransform(), 5, 12, 12);

As I said with the portion of code I changed back it all works fine now.
#5
05/17/2007 (3:25 pm)
Ok, but what isn't working now? Is the camera in a different position? Is it not anywhere near the model? Does it jitter, does it not track, what exactly is the bug?

Do you simply get a warning of some sort?
#6
05/17/2007 (3:31 pm)
No warnings. No console log failures. The camera is centered at the vehicle transform. So basically it is right in the middle of the vehicle. The bug is that it is not accepting the coordinate changes.
#7
06/26/2007 (6:39 am)
I was just about to post a bug report on this. Had the same problem since upgrading to 1.5.2: when I go into ordbit mode, the camera is centered inside the player instead of orbiting around him, regardless of the values of minDist, maxDist and curDist.
Traced the bug back to this exact same line, and did exactly what Ron proposed in his first post, and that solved my problem. I just wish I had seen this post earlier, it would have saved me a lot of debugging! :)

Also thanks for integrating the orbit cam fix 4 directly in the code!
#8
06/26/2007 (10:17 am)
Cool, glad I could help.
#9
06/26/2007 (10:40 am)
Thanks. Added to our bug tracker...
#10
11/03/2007 (4:19 pm)
This bug was driving me crazy. Could only orbit from eyepoint in corpse mode before. As far as I can tell this fix affected nothing else to do with the camera and I haven't experienced any 'jitter' since changing it back. Thanks for the quick fix Ron.