Hi, i havent been on unreal for a while and wanted to make a basic shooter.
When i launch a basic projectile from self while moving, my screen jolts and my player moves up a little.
I assume this is because of an unwanted collision with the player and the projectile? I have tried changing the collision settings on the projectile itself but when i get it to ignore the player, it ignores everything else too.
Use the “Ignore Actor When Moving” blueprint. Set the target to the spawned projectile and the actor to your player character. It should now ignore the player.
You can also add a custom collision channel and use that to filter out collisions.
could you show us an image of where your projectile is coming out of? presuming that the arrows is not far enough out then put it out farther, if it is far enough and because your shooting and moving then the issue is what auran13 said. You may also adjust the projectile to only effect other actors other then the player, do this by pulling off other actor from your projectile collision and get class, then run that through a = and put the acter you dont want it to effect and set it so when it hits your acter it does nothing but other actors you would want to have it effect them only. Run it through a loop and do a trace for all pawns/dynamic actors/ exc… exc…
Hope this helps!
but then i am using the default pawn0 instance, so how do I reference that in the actor part? i have found the cast to default pawn but i dont know what to put in as the object? I also tried the get player pawn and hooked it up to the actor but it doesnt seem to work
Add the ignore ignore after the spawn actor bp and pass in the player pawn.
Where are you spawning the projectile? If it is from the player then you can just pass in a reference to self.
I am spawning the projectile at the cooordinates of the actor but this is done in the level blueprint. is there a way to reference the DefaultPawn0 instance? I cannot find the blueprint for this actor
I’m guessing this projectile is launched from something right? Like a cannon or enemy or some point on the map. It would be better to move it inside of an actor and then you can have many of these projectile emitters on the map with their own logic / ammo etc.
Keeping this in the level blueprint is bad practice.
You can directly reference actors in the level bp (just drag them in from the outliner to the level bp) but they need to already be in the map, which doesn’t happen in the case of the player pawn (it spawns in during begin play)
You would need to rely on the “get actor from class” function to get the player into the level bp, but like I mentioned it’s bad practice and your level logic will become hard to handle pretty quickly.
You would also want to make sure the projectile is not launching from the character but from an arrow facing forward from the character that is at the end of the gun/wep that your using. unless your using the character, then us the arrow on the character.
use a + node on the spawn projectile and then go ahead and use the get forward rotation vector of the character and add to that for the end starting point so the projectile doesnt even touch the character. Generally this can be covered by looking at youtube, they have lots of tutorials.