There are multiple ways of doing random rotations. Your example qill give some “weird” rotations (until you imagine how angles are counted in 3d space).
Instead of creating random rotation I use random vectors then i am changing them into rotations with “Find look at rotation node” (if you put vector as destination and [0,0,0] as start you get rotation out of vector. Vectors are easier to imagine and undestand than rotators. Vectors also do not have polar singularity or gimball effect.
For your “slightly to the left” random vector:
- Get forward vector of your pawn
- pick random rotation
- rotate forward vector by that random rotation around up vector of pawn vector. use “rotate vector around axis” node
- Above vector will point in random direction to left or right depending on angle. It is left/right in pawn reference frame
- now get random vector in cone, as axis use above vector, angle is cone angle
You should have now random vector than needs to be translated into rotation. For that it is best to use “find look at rotation”.
There are also other nodes that are like “make rot from XY”, you supply them with pairs of forward, up right vector, depending on name of node) There is also node that makes rotation out of single vector, but you kind of get random vector that is perpendicular to direction. So find look at rotation is easiest to use.