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"

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. 

Blueprint: Actor Enable/Disable Collision/Simulate Physics bug?

Hey,

I have an issue with the Set Actor Enable Collision and the Set Simulate Physics methods when i am trying to toggle between them.

Also i am unable to teleport/change location for an entity once the Set Simulate Physics is set to true.

http://img.ctrlv.in/img/15/04/24/553a14161b4a6.png

I am unable to disable the Collision and the Physics simulaton on an actor after these methods are set.

This is my Actor Setup:

http://img.ctrlv.in/img/15/04/24/553a144f00f62.png

  • Scene Root Component

  • Static Mesh Component

Product Version: Not Selected
Tags:
more ▼

asked Apr 24 '15 at 09:59 AM in Bug Reports

avatar image

Azarus
1.9k 60 50 189

avatar image Ben Halliday STAFF Apr 24 '15 at 03:05 PM

Hi Azarus,

Can you show us a screenshot of the rest of your Blueprint graph? I'd like to see your toggle setup, as well as what your doing to teleport after Simulate Physics is on. Thanks!

avatar image Azarus Apr 24 '15 at 04:18 PM

This is where i update the position/rotation/scale for my mesh. The Selected Prop variable comes from a ray tracing. http://img.ctrlv.in/img/15/04/24/553a66844f46c.png

This is where i unset the physics simulation and the collision. http://img.ctrlv.in/img/15/04/24/553a67b9da24b.png

This is where i enable/re-enable the physics simulation. http://img.ctrlv.in/img/15/04/24/553a6dd5b35ae.png

This is where i spawn the actor: http://img.ctrlv.in/img/15/04/24/553a6e3bbe34f.png

Fun thing is that if the a physics simulated disabled after the spawn everything is fine. But after the physics simulation is enabled i am unable to change the transform of the mesh no matter what i do.

If you wish i can make a test project because this blueprint is a complex one.

avatar image Ben Halliday STAFF Apr 24 '15 at 04:27 PM

If you can reproduce this in a test project and upload it somewhere for me, that would be very helpful. I'll continue looking into this in the meantime. Thanks!

avatar image Azarus Apr 24 '15 at 05:20 PM

Hey Ben, Thanks for your time. Here is the example project: http://neocoregaming.com/project.zip

I created it from scratch using a blank template. And it has the same issues.

Left Click to Drag & Drop an object. (Physics should be enabled after it's released / disabled when its dragged. The problem is that you can't move the object.

Right Click to Spawn an object and Freeze it. (Everything works fine as expected.)

And Thank you again! :)

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

1 answer: sort voted first

Hi Azarus,

Your setup looks correct to me with one exception: you're setting the Physics on the Cube component, but moving the Actor. So when physics are simulated on the Cube, it separates from the location of the Actor root (a scene component), and the Actor ceases to be movable with Set Actor Transform. I'm going to look further into this to see if there's a bug involved in that, but it's not the ideal way to set this up regardless.

Instead, you can do one of two things:

  1. Make the StaticMesh component the root of the Actor being moved.

  2. Get the Cube component from the DraggedProp variable and Set World Transform for that on Tick

Give that a shot and let me know if that solution works for you.

As a side note, this was fun to play around with. Without knowing what you're looking to do with this functionality, you may also want to look into physics handles or, conversely, restricting physics to planes when turning physics on to drop it (right now you can throw the object, if you want). Also: you might want to throw a check in there to disable the right-click functionality when the DraggedProp variable is valid, because right now it leaves the Actor hanging in the air.

Hope that helps!

more ▼

answered Apr 27 '15 at 09:10 PM

avatar image Azarus May 02 '15 at 06:18 AM

Thank you, it worked. I am trying to setup a simple sandbox builder mini game where you can select props from a menu and spawn them. And thanks for the ideas! I'll definitely look at them :)

avatar image Static.Awesome Apr 23 '16 at 10:08 PM

Yes, thank you so much, this really helped. This is still the case as of 4.11 for anyone reading. Setting the StaticMeshComponent makes things work as expected, the problem lies with moving the actor vs moving the mesh component.

avatar image protothesis Dec 01 '17 at 02:21 AM

This thread helped me with a similar problem attaching a physics object to a motion controller when "picked up". The mesh was parented to a scene component so I could use the offset for a custom grip position, but the thing would just freeze and break.

I thought it mighta had something to do with a separation between scene component and mesh, but this put it into clear language and helped me get on with my life.

Thanks all!

(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