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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

AttachTo not updating StaticMesh location with Physics Enabled (MotionController)

I've been trying to get this working for the last...day more or less, and it's driving me absolutely bananas!

I've been following the Unreal video for creating interactions with motion controllers, and it's partially working. I'm spawning and deleting objects no problem, but I can't for the life of me get "picking" objects to work. (Such as in the can-toss demo they're talking about)

I have MotionControllers, which have a collision model of NoCollision. Each of the controllers has a Collision Sphere around the head of the controller which is set to OverlapAllDynamic. The Collision Sphere and the Controller Mesh both have Generate Overlap Events set to true. The hierarchy of these parts looks like this

I also have a basic Sphere. This is a blank SceneRoot, with a child StaticMesh with these settings

OK, so in my mind that all looks fine. I have created Blueprint Events to handle object overlaps as per the video (for the left controller):

This is the Overlap logic. It checks to see if we're currently holding something, and if not, we set the in-range boolean to true, and set the current "available" object to a reference to the BP_Ball object that we're intersecting with. If we move out of range, we unset the in range boolean (assuming that we aren't currently holding something).

Assuming that we are overlapping, we should be able to pull the trigger on the Left controller, and fire the PickupObject event

Now, this is where what i've done differs from what's in the Video. In their video, I think they are somehow passing in a reference to the StaticMesh itself, as their node from Object to the AttachTo target looks like this:

Unreal Youtube example

Whereas mine looks like this:

My Version

The reason I think this is because later on in the video, you can see that their BP_Ball hierarchy is the same as mine, but they seem to be referencing the name of the StaticMesh:

Unreal Youtube ball hierarchy

For reference, my trigger logic looks like this

OK, so if I don't set Simulate Physics on the Ball, at this point I can spawn a ball in my scene, grab it with the other controller, and when I let go of the trigger it will fall to the ground. Fantastic! Except, once that happens, I can't grab the ball again. The logic is understanding that i'm intersecting with the ball, and is even firing the AttachTo logic in the pickup as far as I can tell (based on some Print String nodes i've dotted around...), but the ball just will not re-attach visually to the controller.

Likewise, if I set Simulate Physics from the start, I can't pick up any ball (although the same logic checks I mention above still fire). It's like it's attaching an invisible object to the controller instead of the static mesh!

This whole issue hurting my head. I know i'm close to the solution, but I just can't get the pieces to fall into place!

Product Version: UE 4.11
more ▼

asked Jun 01 '16 at 04:12 PM in VR

avatar image

6 1 3

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

1 answer: sort voted first

So, turns out that the object cast in the Pickup and Drop routines was the culprit.

I had incorrectly assumed that the DefaultSceneComponent was of the same object type as a Utility Scene Component. However, it turns out that DefaultSceneComponent is actually a SimplePrimitive, with a collision prim, which would explain why adding a new collision sphere to the scenegraph suddenly caused the BP to work.

more ▼

answered Jun 01 '16 at 08:39 PM

avatar image

6 1 3

(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