Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Projectile collisions not working with arrow component as root


I've created a projectile that launches from the player and uses a capsule collision (the projectile is an arrow) but the collisions do not work if I use a root to the blueprint that isn't the capsule itself. I've set up everything almost identical to the FirstPersonProjectile that comes in the FPS template but my arrows just don't register any collisions. The reason I need an arrow or something as my root is because I can't rotate the capsule when it's the root and I need it to be facing horizontally, not vertically which is the way it faces by default. Also if I set the capsule as the root the arrow becomes completely static and facing vertically meaning it doesn't face the direction it's flying in.

P.S Yes I've already set up the collision preset the way it should be.

Product Version: UE 4.14
more ▼

asked Dec 24 '16 at 11:06 PM in Blueprint Scripting

avatar image

Geosmith Tech.
68 15 18 20

avatar image Rekenq Dec 24 '16 at 11:50 PM

What do you mean you can't rotate the capsule when it's the root? Why couldn't you?

avatar image Geosmith Tech. Dec 25 '16 at 12:41 AM

There's no option to. Once you make it the root you only have the option to scale.

Image attached. alt text

root object.jpg (166.3 kB)
avatar image Pariah013 Dec 25 '16 at 02:14 AM

Generally speaking, you want the collision to be a child of the Arrow Projectile component so that it can handle all collision/overlap events. The best root to use is generally just a standard SceneComponent. The main reason for this is because the root is just that, the root. It doesn't traditionally handle much about the object other than to serve as a reference for any Relative Transforms, movement permissions, and a few other things. Most other functions, like with projectiles, would be handled by the capsule.

So TL:DR: Use a SceneComponent as your root. Make the Arrow Static Mesh a parent of the Capsule so the Capsule inherits it's movement, and that should solve any issues you've been having. That is, unless I'm completely misunderstanding. :P

Cheers! ^_^

avatar image Geosmith Tech. Dec 25 '16 at 02:41 AM

Switched around the mesh and the capsule and used a Scene component instead. Same results, the arrow works fine but there are still no collisions. Removing the scene component and having the mesh as produces same results as before, the collisions work but the orientations are wrong.

avatar image Pariah013 Dec 25 '16 at 03:32 AM

Can you post a screen of the blueprint that is spawning the actual projectiles? I'm wondering if it's more something to do with the relative/world spawn locations...

avatar image Geosmith Tech. Dec 25 '16 at 04:12 AM

I think it's the same node as used in the FPS template. I get the spawn location from the location of an arrow object in the player/weapon blueprint.

avatar image Geosmith Tech. Dec 25 '16 at 04:12 AM

alt text

spawn arrow.jpg (90.8 kB)
avatar image Pariah013 Dec 25 '16 at 05:04 AM

I'm assuming that Bow Arrow is the "weapon" that it's being fired out of. It which case, it's relative transforms translating into world transforms may be offsetting the projectiles being fired. Review the FPS template, and take a look at how they track the rotation vector and rotation of the firing point to output the correct orientation based on their real-time world transforms.

avatar image Geosmith Tech. Dec 25 '16 at 05:46 AM

No the bow arrow is another arrow that is always attached to the weapon, once the bow fires a duplicate arrow 'projectile' is launched with the exact same transforms as that arrow. Either way if it would offset the projectile, would it make a difference? They're flying through walls and floors.

avatar image Rekenq Dec 27 '16 at 07:32 AM

Maybe they are flying way too fast so they go through walls. You need to activate complex collision detection for your arrows if you haven't

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Well I've managed to fix the problem even though it wasn't a very satisfying fix. I've replaced the capsule collision with a sphere instead which surrounds the arrow head instead of the entire arrow. I made the sphere the root of the scene which means the collisions work without a problem and since the arrow is the child of the sphere it can be moved so that the arrowhead is inside of the sphere.

Thanks to everyone who tried to help!

more ▼

answered Dec 27 '16 at 09:26 AM

avatar image

Geosmith Tech.
68 15 18 20

avatar image Geosmith Tech. Dec 27 '16 at 09:29 AM

I'd also like to mention I probably really messed up some transforms, constantly moving things and making components childs/parents and also had the original arrow mesh facing the wrong direction on import so had to rotate the arrow in 3DS max and created a blueprint from scratch.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question