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"

Parent blueprint for pickupable items works 1st time, doesn't 2nd

I've been trying to create a blueprint that will allow me to pickup any item that has it set as a parent:

Parent blueprint class, Attach to component

It's based on VR Template BP_PickupCube: BP_PickupCUbe

Idea is as follows: Pickup: Put key variables in temp storage, loop through all components, disable simulate physics on all Primitive Components, attach it to the controller. Drop: Disable physics on all Primitive Components, detach yourself from parent.

Problem though is that I can pick it up, drop, but when I attempt to pick it up again - nothing happens.

I spent almost 2 days trying to debug it, and have no idea what's the problem. It seems to be loosing track of Components after they are dropped, but I have no clue how to redeem it & make the whole thing work....

Anyone can help out?

Product Version: UE 4.14
Tags:
more ▼

asked Nov 16 '16 at 05:01 PM in Blueprint Scripting

avatar image

MarcinW
60 7 8 12

avatar image TechnicallyLew Nov 16 '16 at 09:20 PM

I think the problem here lies with the physics simulation is moving the actors location but the representation you are seeing is different. All I see if a root scene component, how is it displayed in game?

Assuming that you perhaps have a Static mesh? Perhaps the mesh is simulating physics whereas the actor component you are grabbing is not and therefore, the mesh is one position, the actor you want to grab however is actually somewhere else entirely?

Need more details on the setup of the actor being picked up as a scene component root can't be the end result... can it?

avatar image MarcinW Nov 17 '16 at 12:38 PM

NukePie - in the game DefaultSceneRoot is not displayed at all. It doesn't even have a simulate physics option.

Here is a setup of my actor being picked up: Actor being picked up No scripts, just a single Static Mesh Component (Sphere) without simulate physics. As soon as I enable Simulate Physics it's impossible to pick it up. You are right - simulate physics is causing it to be impossible to pick up. But I have no clue why or how to prevent it from happening.

In BP_PickupCube from VR Template scene root is the Mesh itself, and it's working fine, so I presume that in my scene I'm picking up the invisible root, while Sphere stays where it is.

avatar image plangton Nov 16 '16 at 10:25 PM

It is extremely hard to find it out with tge blueprint you shared. But i th8nk you might have made a mistake in the callflow of dropping and item. Is tge detachfromactor BPwritten by you ? can you share some part of the code and the general logic ?

Ps : by drive class you mean drived from BP Interface, yes ?

avatar image MarcinW Nov 17 '16 at 12:42 PM

DetatchFromActor is the exact copy from VR Template blueprint BP_PickupCube, which is working fine. What I added is the loop before it that's suppose to reenable Simulate Physics for every Static Mesh Component. And yes, it does have an inherited Pickup Actor Interface (otherwise I wouldn't be able to pick it up at all). See also the other response - it shed some light on a problem.

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

0 answers: sort voted first
Be the first one to answer this question
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