My game is sidescroller, so I have a problem with slow turns (my enemy) on 180 degrees, (move forward and backward on X direction). So I wonder if there any way to make turn around for my enemies much quicker?
Second problem, is that enemy trace me depending on distance that set up in default properties, so let’s say my character on 3 rd floor, and enemy on 2 nd and he can see me, also he move in direction that I go (same problem when my charater below him). Is there any way to make his trace only on x direction to avoid this problem.
For the first, you can try with rotationrate.yaw, in the pawn class. Use “focus” to point to the player, then rotationrate.yaw control the velocity.
For the second, I don’t understand very well, but you can use dot product to get the orientation between pawns, or vsize. Perhaps this helps you: Legacy:UnrealScript Vector Maths - Unreal Wiki
Hi again.
Have no luck with rotation. If I am right, I need something like RotationRate.yaw = 20 in my enemy class, and I not sure I understand where
exactly I need to put this line. Any help would be appreciated.
Thanks in advance.
Again me. Back to first question. So, try to clarify my problem. In my script I have controller which extends from UTBot, so my bot moving from point to point and if I in his aggressivemode (pc != None && pc.Pawn != None && VSize(Pawn.Location - pc.pawn.Location) <= aggressivemode)) he will verify shoot at me or chase me, and if I in AttackDistance he will shoot at me
As I mentioned my game is side scroller. For example I have a house with 2 floors. Bot is patrolling 1st floor and my pawn is on 2, and a problem is when my pawn located right above my enemy (or so), I am in his aggressive mode distance, so he stop patrolling. To solve this issue I can make space between floors higher, or in my def prop make aggressivemode distance smaller, but both options is my plan B. In kismet this problem would be solved by adding “trace node”, if player not obstructed = stop and shoot, if obstructed = don’t bother.