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"

Which is the best way to keep a Physics Actor frozen / stopped without disabling physics?

Hi, I have moving physics actors that I want to freeze, stop or pause at a certain point. Which is the best way to do so without disabling SimulatPhysics? If I do so I meet undesired go-through behaviours... By the way, Put Rigid Body To Sleep doesn't work on my actors' physics static meshes.

Product Version: Not Selected
Tags:
more ▼

asked Nov 09 '14 at 05:06 PM in Blueprint Scripting

avatar image

Albert Espín
987 81 98 361

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

5 answers: sort voted first

I'm looking for a solution to a similar issue but stumbled across this in doing so. I've used a physics constraint velocity drive which works pretty well.

more ▼

answered Feb 18 '15 at 09:38 PM

avatar image

paradoc
1.2k 49 31 87

avatar image Katianie Apr 19 '17 at 04:49 PM

This is what worked for me, thank you!

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

Try setting the object to sleep then reawaken the rigid body whend desired

more ▼

answered Jun 06 '16 at 03:19 AM

avatar image

Halocomander1
49 6 12 14

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

You can stop the actor movement applying this formula (still being affected by gravity)

meshComponent->AddImpulse(meshComponent->GetPhysicsLinearVelocity() x (meshComponent->GetMass() x -1));

more ▼

answered Mar 22 '17 at 04:10 PM

avatar image

Daniel Ocheda
26 3

avatar image Katianie Apr 19 '17 at 04:50 PM

This works pretty well, the issue I had was that even though it stopped moving, it was still spinning. I even tried Adding angular impulse but that did not help. Ultimately, Physics Constraint saved the day for me.

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

I am new to this but have you tried setting actor transform to current location. I believe this would kill and speed it had built up. However I have not tried it and it may not work. Let me know how you solve this as I wouldn’t mind figuring it out either.

more ▼

answered Nov 10 '14 at 02:27 AM

avatar image

Imonin
16 1 4 8

avatar image Albert Espín Nov 10 '14 at 04:05 PM

Hi, thanks for the suggestion, but Set Actor Transform or Location for the simulated actors would only work for the frozen sort of effect if I did it repeteadly, but that is a bad solution in my opinion (setting location to the frozen location on every Tick is bad because the actors moves a bit even with best framerate; and doing it repeteadly at computation time, so faster than Tick, at first with a while loop would give an infinite loop warning/error, and with a bit of a workaround to avoid that, it would still be a bad solution in my opinion, specially with lots of physics actors in action, as performance would go down in quality).

What would be great would be to be able to set the actor's gravity to 0, but I haven't found that possibility. Set Enable Gravity seems to have no effect while simulating...

If you have other suggestions they would be very welcomed!

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

This is a problem for me now - I don't want to pause through the controllor (at least I think I don't) because I would like to animate objects during pause. However I do want a subset of objects to 1) not move and 2) Not respond to any collisions (i.e. behave fixed) and 3) Not accumulate any forces and 4) maintain their current velocity and overlaps with other paused objects etc when I unpause them.

The current problem I'm facing is that forces seem to accumulate while they are paused.

more ▼

answered Nov 19 '15 at 05:24 PM

avatar image

theonecalledtom
1.3k 61 68 271

(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