Hi. I have a problem trying to put a 2D interface on my game. It should stay still at the bottom of the screen.
I tried to parent a plane to the camera, and it works ok in Blender (in the editor), but when I run the BGE, the plane starts moving around and doesn’t stay with the camera (which is animated with an IPO). I also tried the track constriction, but its even worse.
I’ve been doing searches on this forum and on Google, but I didn’t find anything
Any ideas?
Hi.
Thanks for your replies. I tried to make a new camera, parent it to the plane, and it’s working now.
Anyway, it seems my camera was broken. I made a small blend file so you can see what happens (if you want). If you go forward (right arrowkey) you can see the plane is moving ok. But if you play the animation (hit C to move the camera) you will see the plane is not correctly attached.
Remove the parent from the plane (alt+p > clear parent) then re-parent it to the camera.
Should work now.
You don’t have to remove the lens ipo if you want the camera to zoom past the plane, which it does once you re-parent the plane (instead of whizzing away).
Deleting the camera, making a new one and linking it to the old IPOs worked. Remade the lens IPO and its working fine now.
However, I want to try the scene overlay solution from Rorkimaru, but I don’t really understand how it works.
I made a new scene with the overlay. Then I linked the camera to this new scene, but it’s still moving, and I still need to parent the plane to the camera. Am I missing anything?
Hello
add a new scene
Add a camera on it
Add your 2D interface
In camera view, check if your interface is placed as you desire…
Then in the “main” scene add ( if you want that the overlay appears at game start:
Always Sensor (uncheck trigger buttons) -> AND - Scene Actuator - Add Overlay Scene - Name_of_the_scene_here
Bye
Thanks for your reply, Oto.
I already did what you said, but I’m afraid the camera has to be the same (linked) in both scenes. And since it has an IPO, it moves around in both scenes.
If not, how do you tell Blender which camera it should use? I thought it used the one named Camera by default. Putting a new camera in the new scene doesn’t have any effect.
??
Let’s say you’ve a main game scene, with 20 cameras or whatever
Then you select a camera and do Ctrl-NumPAd0 to make it the “view/active” one
This one will be the “game view” if you press P key
If you add a camera in another scene/overlay scene it’s just to have a way of see/place your objects/texture/HUD to fit the “game window/view”
It’ll not interfere with the “active” one.
Do you need an example?
Bye
Ther was nothing wrong with your first blend file it will hapen lots of times with diferent object i dont know why they dont do something about it because meual thing isnt good for few people (i needed lots of time to finde this out) you just press Ctrl+A and select “scale and rotation to object” this will aply it and all will be perfect (this works for all the same like soft bodys and so on)