I'm creating a game in Blender. The enemies in the FPS are sprites on a flat plane. The only problem I have is making the flat plane to where it's constantly facing the player camera similar to Doom, because the enemies aren't in 3D. Is there a way to make the flat plane mesh constantly face the player camera using the Logic, or is there any Python coding involved?
If you enable
Billboard in Materials Tab under
Game Settings > Face Orientation, the planes local x-axis will always face the camera while the z-axis remains as it is (= the object rotates only on its z-axis).
This is not a very good answer but it should get you there. I've dug out the logic bricks of a game I made a long time ago when learning the BGE. The pic pretty much says it all...
To bring the enemy sprites' logic up, select them in the 3D window.
The "Near" sensor detects when the player gets within the distance range you type in and sets off 3 actuators. The one you're looking for is "Steering". That will make the enemy face the player or whatever you nominate. I see I'd set him to an almost zero velocity. (coward that I am)
The other two are broadcasting messages which other "Sensors" can pick up and act upon or ignore.
I imagine you'd need your enemy sprites to pick up a broadcast "message" and "Steer" them towards the camera or player. Same with anything else that has to do the same.
Good luck with your game. It was a lot of fun as I recall.