When my pawn start at 259,14,124 and i m looking towards barrels at -20,0,34 i am shooting backwards, and i can’t shoot in a cone of 90 degrees to the right and left. Its like the “gun” stops at that rotation and shoots there but i keep turning. When i get past 90 degrees to either side it works without a problem.
However when i move it works, as expected
It sounds like it’s hitting the player. Spawn the projectile a little in front of the player.
Get the forward location of the player, multiply the result by 100, add that to it’s location, then use that for the spawn location.
Thank you for your suggestion. It sort of works, if i add 300 to it. However on some rotations, it seems there is an offset from where the ball shoots. it’s not in the center.
By any chance could you show that?
I tried uploading a video here: https://youtu.be/TKbBEAYHeLQ
Notice when i move the camera, the shots are off center, and about 13 seconds into the video, the shots counter keeps counting down, but no shots are seen.
Oh right yeah, sorry. The forward vector of the pawn doesn’t change, get the forward vector from the control rotation.
I’m sorry but i don’t really understand what you mean by the Forward vector from the control rotation. I can’t seem to find any controller functions that makes sense.
Not controller, control. It’s the bottom left node in your screenshot. Drag off the pin and search for forward vector. Then use that instead of GetActorForwardVector (the middle of the three)
Thank you, that worked. For reference this is how it looks (wrapped in a function)
Any idea why i had to do this? Tried downloading the project and using the exact same things. Is it because im in 5.3?
It’s not 5.3 as it happens with other versions; only some people experience the projectile colliding with the pawn. Not quite sure why.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.