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"

StaticMesh gets de-attach from physics object when

Hi there, this is my first time posting here.

My setup is a character that i want to be able to pickup an item (Pickupable blueprint). From start all instances of Pickupable have Simulate Physics set to off. When i pick them up and attach to my actor.

alt text

So basically i disable Simulate Physics (in case it was set), so it doesent fall out of our hand. Disable collision so it doesent keep colliding and then call AttachActorToComponent to put it into our socket.

When i wanna drop the item, i DetachActorFromActor, Renable Collision and Physics. alt text

The Item i pickup is shown here: alt text

So actually i have made a Interactable -> Pickupable -> Weapon -> m4a1-s and what i put in my level is the m4a1-s blueprint.

In my Level it looks initially like this(billboard and mesh and interactionsphere are all neatly together): alt text

Problem is shown here. When i pickup an item and dropped it, the billboard have been detached from the StaticMesh.

How do i get the object hierarchy restored proberly? alt text

If at all possible point out where i've done something wrong(and if someone has a link to a good ressource that explains this better in depth, i would very much appreciate.

Product Version: UE 4.9
Tags:
more ▼

asked Oct 25 '15 at 10:53 AM in Blueprint Scripting

avatar image

Jonas_Molgaard
491 29 25 47

avatar image Jonas_Molgaard Oct 25 '15 at 04:49 PM

Follow up question: Is it possible to get the interactionSphere to fall along with the physical enabled Static Mesh?

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

1 answer: sort voted first

Ok i figured it out myself. I ended up with a simpler component hierarchy. Static Mesh (as root) - InteractionBox (CollisionBox) - Auto Weld (uncheck) which ensures the CollisionBox does not inherit the collisionsettings from my Static Mesh.

When i pickup my item i disable Physics and collision and right after i make sure to re-attach my Static Mesh to the RootComponent,

When i drop it again, i detach actor (item), enable Physics and collision and finally i Attach my InteractionBox to Actor again with "Weld Simulated Bodies" off.

If someone can come up with a more elegant solution to this, im keeping this question open for a bit more. But will resolve it if i don't hear from anyone.

more ▼

answered Oct 26 '15 at 07:45 PM

avatar image

Jonas_Molgaard
491 29 25 47

(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