What is this garbage? (track+setPos with camera)

So I was setting up this camera system in which the camera tracks to an empty as the camera stays fixed behind the player. (This is so it can focus on the midpoint of you and a locked-on enemy.) The camera is constantly copying the position of an empty parented to the player. I press P and the camera disappears. I parented a cone to the camera to see where it went and that vanished too. I get correct results when I code “print own.getPosition()”, but when I tell it to print its orientation I get this crap:


I know these values have something to do with non-number floats, but how do I fix it?

I have real problems with the Track to actuator, I have noticed it is very bad when adding multiple instances from another layer.

They cannot track to objects that are directly behind them, and sometimes they just get lost all together and go into a spin.

To make a long story short, I think the Track to features are plagued by a bug(s).

I think the Camera logic brick is great. I used to use it to make rigid-body-joints by tracking objects to eachother in sumo. If you want a better understanding of how cameras work, track visible objects to eachother.

Another way to get a smoother-ride with the camera is to do the following:

1] Create Empty 1 to track your player with a Camera Logic Brick.
2] Create Empty 2 to track empty 1 with a Camera Logic Brick.
3] Create a Camera to track Empty to with a logic Brick.
4] Track the camera to the player with an (f) delay.

You can adjust the height, min and max to get some interesting camera tracking effects.

It’s worth noting 2 things.

  1. Good games have multiple camera views that the user can change. Obviously this is because one camera view is never enough to get exactly the coverage you want.
  2. The camera logic block can give you crazy results if you do not pay attention to the “GET BEHIND AXIS” property. That’s probably what is causing your “spin”.

This topic’s a month old, it shouldn’t have been revived.

I will say, however, that I fixed the problem by (instead of using a brick) using the pointToObject script in the rotation matrix tutorial around here somewhere.

I did not realise there was a 4month expiry date on all subjects.
Who made this rule?

It’s more of a guideline than anything: after a month without activity, a topic is considered dead.