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"

Static Meshes not dropping once detached from socket?

I'm currently working on a simple weapons system that involves simple weapons comprised of a collision cube and a static mesh that attach to a socket on the player once equipped, and detach from the socket once dropped.

The issue I'm facing is that once the weapon is detached it just floats there at the point it was before detaching, whereas I'm trying to have it drop back to the ground as it should. I've tried enabling physics and gravity on the Static Meshes but that doesn't seem to help, any ideas are appreciated. Thanks!

Product Version: Not Selected
more ▼

asked Aug 05 '14 at 06:13 PM in Blueprint Scripting

avatar image

6 2 4 5

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

1 answer: sort voted first
  1. enable "simulate physics" in your mesh properties in the bp

  2. set the collision to block all

  3. now in the event graph you will have to deactive the physics before you attach the mesh to the socket -> set simulate physics and you will have to disable the collision -> set collision enabled

  4. now when you detach the mesh you will have to active the physics and the collision again

Thats it ;) Now it should work

more ▼

answered Aug 05 '14 at 06:39 PM

avatar image

5k 160 21 144

avatar image KGYTS Aug 06 '14 at 10:41 AM

Hmm, I had all of that aside from the 'Block All' Collisions, and it now works to an extent, but there are some issues I am having. When picking up the weapon, sometimes the mesh will not attach correctly (depending on which weapon it is, due to different mesh sizes) and will instead fly about and end up at weird angles, sometimes flying off entirely. Any ideas on why this could be happening? The order of events when picking up a weapon is as follows -

Check if we already have weapon > Cast it correctly (All derive from a base weapon with no mesh) > Set physics on the mesh to 'off' > Set collision to 'off' >Set it as current weapon > Attach to Socket

As the physics and collision are being disabled before being attached it doesn't make sense to me that having 'Block All' on is causing this strange issue when being equipped and attached. Any ideas?

avatar image fighter5347 Aug 06 '14 at 11:09 AM

Hmm strange -> in my case it works perfectly. Take a look at this picture and check if you have made it like that (1=Attach; 2=Detach): alt text

attach_detach.jpg (168.4 kB)
avatar image KGYTS Aug 06 '14 at 01:27 PM

Aaaah, I was using 'Set Actor Enable Collision' instead of Set Collision Enabled, which seems to have been causing this issue. Alright that seems to be functioning a lot closer to what I need now, any further tweaks I'm sure I can figure out from here. Thank you very much, really helpful!

(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