So I’m experimenting with the BGE and it’s really fun so far, but inevitably, at some point in every project that I start, when I press P, the in-game camera starts to act extremely strangely. It seems to distort objects closer to the camera… it’s hard to explain, here’s an example.
(This is a square plane we’re looking at here!)
Any one know what the problem might be? I’ve been playing with the game framing settings and they seem to do absolutely nothing.
Here’s the .Blend. I’m selecting the camera and pressing Ctl+Num0 before I start the game, otherwise the camera logic doesn’t work. I read in some tutorial to do that I think… that’s how you set the active camera, right? After experimenting a bit more, the problem doesn’t seem occur when I don’t start the game this way.
EDIT: Wait, I think I solved it… I changed the Render resolution to the same as the game framing settings and it seems to work correctly now… I wasn’t aware there was any relationship between the two! Do they need to be the same?
EDIT2: Er… nvm… after re-opening it, it’s broken again…
Oh ok, I see now… Thanks! So am I understanding correctly if that bounding box isn’t lined up perfectly with the edge of the screen, there will be some degree of distortion? Is there a hotkey to line it up perfectly? Using the scroll wheel I can’t seem to get it very close.
Also, why does it behave this way? Is there a way to make it simply render from the camera I set up and disregard where my viewport happens to be?
Sorry for the DP, I had another question I forgot about. I’m using the camera actuator to track the “player”. I’ve maxed out the settings in it’s logic brick, but it still zooms in ridiculously close to the cube. Is there any way to get it to track it from further away? Moving the camera further out in object mode appears to do absolutely nothing, and it snaps back to being really close as soon as I start the game…
well… i would not recommend the camera actuator, just parent the camera to the player and use slow parent, it’s the exact same thing without the initial animation.
Ok thanks. One question though, I have q and e set up to “move” the camera right and left (which effectively rotates it around the subject) but the slow parent method breaks this Is there any way to get this functionality to work with slow parent?
Well basically, what I want to do is to have the camera rotate around the player automatically (avoiding obstacles and things and keeping it in veiw- this is why I was using the camera actuator) but still allow the user to intervene and rotate the camera around and pitch it up and down. (The idea is to have a controller and use the right analog stick to control the view…)
Is this currently possible without python scripting? Really most of what I’m trying to do can be accomplished by centering the camera’s object data in the center of the player (then rotation is easy to achieve) but since the camera has no edit mode, when I center it’s rotation, the camera goes with it. I also tried making a mesh a camera, but even when moving the verticies away, the camera still renders from the object center…
So in other words, is there any way to set the camera’s center of rotation to a point other than the location of the camera?
Have an empty at the objects center. Parent the empty to the object. Then parent the camera to the empty. Rotating the empty will get what you want, I think.
I actually came up with that rig myself (came to me while on the john…lol) last night . This seems to work very well with one slight remaining problem. The camera also copies every single vibration of the cube as it moves across the landscape. (In other words, the player never shakes… EVERYTHING else does!) I tried to limit the rotation on the X axis, but the parent-child relationship seems to take priority, and this has been ineffective…
I really appreciate all the help you guys have rendered!