x

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"

Attach projectile to actors when hit? (sticky projectile)

I currently have it so a spear hits an object but if the object falls the spear remains floating in space. I've read an Attach to Actor node is needed but I'm not having any luck setting it up. Is this setup getting close? (see attached) And if so what do I plug in to the Attach nodes 'target' and 'parent' so the spear sticks to anything if it moves/falls. eg. the cubes in the first person template or a copy of my character model with a physics asset.![alt text][1]

Thanks for any help.

Product Version: Not Selected
Tags:
more ▼

asked Jun 04 '14 at 12:26 AM in Blueprint Scripting

avatar image

Chimp
66 6 8 12

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hello,

I'm sure there is another way to do this, but using the FPS template you could modify the projectile Blueprint to something like this:

alt text

The section in yellow was added and stops the projectiles movement once generating a Hit and attaches it to the Hit object.

-W

more ▼

answered Jun 05 '14 at 03:11 PM

avatar image

Wes Bunn ♦♦ STAFF
5k 145 64 206

avatar image Chimp Jun 06 '14 at 05:32 AM

Thanks Wes, this works great for the cubes but not so much for a character. I have Owen walking around in my scene and the spear hits him but stops dead as he walks on. What would I need to add for it to stick to him?

avatar image poky Mar 31 '18 at 09:15 AM

doesnt work for me

avatar image Nebula Games Inc Mar 31 '18 at 02:31 PM

what happens with yours? Post screen shots of the set-up and collision properties etc As much as you think is relevant so someone can help

(comments are locked)
10|2000 characters needed characters left

Wes answer: It works if the actor simulatePhysics enabled. But I don't want that. Look at my image. This works for me. Projectile sticks to anything!

alt text

more ▼

answered Mar 31 '18 at 02:40 PM

avatar image

poky
1 2 4

avatar image Nebula Games Inc Mar 31 '18 at 02:47 PM

I am confused. You said "doesn't work for me" and now you're telling me it works for you? I thought you were having trouble getting this to work ha

avatar image ThompsonN13 Mar 31 '18 at 02:51 PM

yea their bp doesnt attach to the object hit so it would never work with moving objects.

avatar image poky Mar 31 '18 at 03:50 PM

The first answer doesn't work! But my solution works!

avatar image ThompsonN13 Mar 31 '18 at 04:26 PM

the first example works as its meant to. in the first one its only meant to stick to physics objects. so its not a work doesnt work its more of a applies to your situation. for example if you wanted a projectile that only attaches to characters then the first one is the way to go. yours doesnt actually attach the projectile to anything so it isnt exactly complete but if it had been it would be suited to sticking to walls. as it is now though yours would have issue sticking to any moving actor such as a character.

(comments are locked)
10|2000 characters needed characters left
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