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. 

Disable "Set Simulate Physics" but still allow collision response channel on WorldStatic and Pawn?

I'm implementing a Pick Up Object blueprint scripting taken from Content Examples, but has come to a problem where when the following order of operations are given, it is kind of wonky:

  1. Start picking up object by pressing the gamepad trigger.

  2. Create a line trace.

  3. Obtain the component that the line trace hits on first encounter.

  4. Disable simulation physics flag. <-------------------------------------------------

  5. Start manipulating the pitch, yaw, and roll of the object.

  6. When satisfied, release the gamepad trigger.

  7. Enable simulation physics flag of the object <---------------------------------

Note that the arrows pointing at the simulation physics flag order of operations.

Note about why I need to disable physics simulation. If I did nothing to it, what would happen is the when the object is picked up, because the physics simulation isn't disabled, the object will continue to swing around wildly according to the momentum the player moves the object around in the air. It will however, collides with all surrounding obstacles, which is good, but I don't want the object to spin around wildly in the air, and not being able to let the player control the pitch, yaw, and roll of the object. Disabling the physics somehow works.

I can disable the physics simulation of the object just fine, but what happens is the object will clip through walls, floors, obstacles, pawns, players, and basically any objects with collisions when the physics simulation is disabled. The player has free range of pitch, yaw, and roll of the object, and that is great. Now I wanted to have the collision response enabled for the picked up object, but I don't know what to do or where to begin.

Looking in the AnswerHub, I don't see anyone asking this question, or asking similar/relevant questions about this.

Even though the blueprint is mostly a copy from the Content Example, Physics level section in the MyCharacter blueprint, all I did was I added a "Set Simulate Physics" node to grabbing objects and releasing objects. No changes were done other than that.

Does anyone know how to add collision responses to an object with physics simulation disabled?


Product Version: Not Selected
more ▼

asked Dec 07 '14 at 12:15 AM in Blueprint Scripting

avatar image

293 31 30 91

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

1 answer: sort voted first

Fixed this issue.

Used this method highlighted in orange to simulate collisions while still being able to control when to simulate physics.

First thing to do is to allow physics to simulate (which I will delve later on), and concentrate on the collision responses via setting angular and linear velocities to zero, and optionally, set anything related to angular and linear velocities to zero.

Disabling physics simulation will causes the collision responses to be ignored, no matter what you do, since I believed the flag that sets the physics simulation is in the outmost condition nesting all collisions-related functions.

alt text

Next thing to do is when you release the component, reset the physics simulation in order to initialize it back to the state before you grab the component.

alt text

Note that there's no need to disable/enable physics simulation of a grabbed component here.

alt text

All that is left for you to do, is to make your collision boxes for your static meshes be thicker and bigger in your levels, so that the grabbed component won't penetrate through the collision boxes and come out on the other side of the collision boxes.

Fixed this issue, but I do wish there are other better ways to do this, like really pushing the objects towards the player upon colliding with walls, and not having the objects go through the collision boxes to the other side. Levels with thin walls will be an issue, and there will be no other options with the collision boxes for the static meshes.

Basically, Portal 1/2 pick up objects physics simulation is impossible from this point on.

more ▼

answered Dec 13 '14 at 09:30 PM

avatar image

293 31 30 91

avatar image paradoc Feb 18 '15 at 09:41 PM

I believe physics handles cover this now

avatar image asperatology Feb 19 '15 at 01:38 AM

You could say that, but we fixed it without using physics handles. Here's a Youtube link showcasing how it would look like.

Unfortunately, the blueprints are now stored in my professor's files.

avatar image Katianie Apr 14 '17 at 02:00 AM

Not for me they dont, I'm trying to do the same exact thing but SetAngularVelocity and SetLinearVelocity don't have an effect.

(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