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"

Can't set position of an actor that once had physics enabled

Engine Version:

4.8.2

Steps to reproduce:

  1. Create new project using Blueprint First Person Template

  2. Create a new Blueprint based on the Actor class

  3. Add a new cube component to the Blueprint

  4. Enable Physics on the cube component

  5. Set auto receive input from player 0 on the Blueprint

  6. Add an event to the blueprint for the key "E" to change position (see example)

  7. Place an instance of the blueprint on the map

At this point, if you play the game, pressing "E" does nothing. If you stop the game. disable physics on the cube component, and restart the game, pressing "E" changes the object's vertical position as expected. This in and of itself is a bug in my opinion.

The bigger bug though, is that if you disable physics simulation in Blueprint, you STILL cannot set the actor's position. Repeat the same sets as above, but add a node to "Set Physics Simulation" to false on the cube component.

What appears to be happening is that the actor is being moved, but the physics enabled component isn't (so the local position is changing, but the world position isn't). See screenshot:

alt text

Conditions:

In my effort to ensure I provide as much detail as possible, I've been looking into the issue more:

  • SetActorLocation works fine if the root component is the component with physics enabled

  • SetWorldLocation works fine IF called on the component with physics enabled but then the physics enabled component and root component get out of sync

Blueprint Component Hierarchy:

alt text

Example Blueprint To Change Position:

alt text

Example Blueprint To Disable Physics Simulation:

alt text

Product Version: UE 4.8
Tags:
more ▼

asked Jul 25 '15 at 02:48 PM in Bug Reports

avatar image

Brandon Wamboldt
82 4 12 21

avatar image Brandon Wamboldt Jul 25 '15 at 02:53 PM

Even a hacky work around would be appreciated though, I have found no way to get past this

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi Brandon,

The reason that this isn't working is because the GetActorLocation node is setting the location of Self, which is the Default Scene Root. If you swap the Default Scene Root for something that you can see (like a Billboard or StaticMesh component) you will see that the it does move how you are telling it too.

To fix this, you can either set the Cube as the root which will work with your original setup.

Or make a direct reference to the Cube.

alt text

If you have any other questions just let me know.

Cheers,

TJ

physicscube01.jpg (131.2 kB)
more ▼

answered Jul 27 '15 at 01:07 PM

avatar image

TJ V ♦♦ STAFF
41.2k 1009 181 493

avatar image BRS Office Jun 10 '16 at 11:34 AM

it didnt work for me even when i set simulate phusics to false

avatar image TJ V ♦♦ STAFF Jun 14 '16 at 08:26 PM

HI BRS Office,

I just tested this in 4.12.2 and it is working on my end. Feel free to post a screenshot of your setup or a small test project and I will see if I can help.

TJ

avatar image error406 Jul 28 '16 at 07:36 AM

Thanks, this solved a similar physics get location problem for me too

(comments are locked)
10|2000 characters needed characters left
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