How do I go about creating an artificial horizon hud element for my flight game?
This one's puzzling me and it's my first attempt at a HUD element other than bunging some text displays in to show my altitude and velocity.
I've created a sphere, top half is blue (sky) and bottom half is green (ground). I'm then using a teleporter to match the orientation, but not position, of the helicopter. This part of it seems to work fine.
My camera follows my helicopter at a fixed distance, so what's the easiest way of creating something that will always be in the same place on screen i.e to move exactly with the camera as it moves and rotates.
At first I thought it may be as simple as grouping the sphere with my camera rig but the sphere doesn't move with them at all doing that. Not sure why either to be honest.
-
I'm not totally sure how you had your group set up, but if your sphere is moveable, it probably needs to be attached to an immovable object. I would group a static cube to the camera, use a connector to link your movable horizon sphere to the cube, and then attach a max strength gyro to the sphere so it's always alligned with the horizon. Once it's all set up, I'd make the cube invisible.Unless I'm imagining it all wrong, in which case feel free to ignore. :P
Andy -
On a side note, there seems to be a bug where editing a post makes it post in triplicate. XD
-
Thanks but I need the sphere to be able to rotate freely, while staying where it is in relation to the camera. It's an artificial horizon in the sense the same way as the artificial horizon instruments you would find in a cockpit. Although it's a third person game, with the camera following the chopper, I want the AH on the hud rotating to represent the chopper's current orientation. I actually have that part working but it's keeping it in place in relation to the camera that I can't figure out.
-
And I didn't think we could edit posts on here?
-
This might work with a follower. If you add a tag to the chopper and alter its reference to the position where you want the ball to be.
Then add a follower to the ball, set to follow the tag in all axis and set the follow speed high so that the ball doesn't lag behind when the chopper moves.
I managed to get a camera rig on a cube to follow a bouncing ball using this method so it could work in this instance too. -
Turn on the position toggle on the teleporter and turn off the orientation toggle. Now place a look at rotator and set every slider on it to maximum.
Now take a movement sensor and place it on the same microchip as the camera, then set its Z gizmo the same direction the look at rotator ones is pointing at.
Tweak the sensor and take from the bottom 3 values on the first page the Z one and wire it into the scene space DIRECTION of the look at rotator. -
Sorry. Place the movement sensor on the helicopter. Since you want his orientation. And use the teleporter to teleport the sphere in front of the camera.
Please sign in to leave a comment.