How do I get an enemy in an fps to aim the player?
Do I need Python, or can I use actuators?
How do I get an enemy in an fps to aim the player?
Do I need Python, or can I use actuators?
The best thing to do is look for a mouse look script. In google search for Python scripts, then set up a python script actuator and attach everything. That is the quickest way, there are several scripts, and they are all mostly free to use… As far as the crosshair, just make an object that is centered with the empty creating the bullets…
He wants the enemy to aim at the player, not the other way around. Well, the easiest way would be a track to actuator. For that, you would want the arms and head as separate objects so that they track independently from the rest of the body. To make it “good,” you would want an action of the character aiming straight down to straight up over the course of 1k or 2k frames. Then you would want a property playing the action, initializing at the middle frame (where the character is facing straight ahead). You would need Python to get the angle between the enemy character and the player, and right an equation that will change the property value based on that angle. To get the angle, I don’t remember if there’s a simple python function for that, but you could just get the position of each object and do some trig.
Ouch…
Well thanks Magnum