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"

I made a localized physics system in Unity 5 (artificial gravity, inherited transforms, etc) and want to port it to Unreal. Running into a large wall. Video inside!

Hey guys!

I made a thing in Unity.

https://youtu.be/mFzPIw_nsYc

Two things stand out: Artificial gravity based on a trigger collider, and the fact that all the physics objects inside that volume seamlessly inherit all transforms. (Also, they don't receive any external acceleration that the master rigidbody experiences!)

I achieved this with this hierarchy in Unity:

  • Container w/ trigger volume, no physics, just transform. A script applies 10 m/s2 of acceleration to all objects within the trigger. - --> Physics enabled cubes - --> Kinematic physics platform

  • Unconnected "master rigidbody", physics enabled, arbitrary/unrelated collider for CoM purposes.

And, every physics tick, a separate script made the physics-less container copy the transform position and location of the master rigidbody, without actually being a child.

Unreal Engine 4.10 uses PhysX 3.3, the EXACT same physics engine that Unity does.

However, I have been entirely unable to recreate the effect in UE4. The issue is that the child physics object is aware of the overall motion of the container, and experiences world-coordinate-based momentum when the container moves.

In the Unity demo, the boxes inside the container are entirely unaware of the movement happening outside of their direct parent. In Unreal Engine, the physics objects act very normally, very aware of the movements occurring outside of their local coordinate space.

Basically, it all boils down to this:

Is there any way to make a PhysX object in Unreal only use relative coordinate space?

Thanks guys. Hopefully you enjoy my little tech demo in Unity, and are able to sort out my physics woes.

Product Version: UE 4.10
Tags:
more ▼

asked Feb 04 '16 at 05:58 AM in Blueprint Scripting

avatar image

finnnorth
6 1 1 1

avatar image Lanthorn Feb 26 '17 at 04:22 AM

You'll have to accept the fact that Unreal doesn't want you to do this. I've been down the same blood-soaked road, and there are many other trauma cases sitting in self-help counseling huddles trying to recover as well.

Your best bet is to vote for these features in Unreal, but if you value your sanity, stay in Unity for now.

avatar image Wobbleyheadedbob Feb 07 '18 at 02:53 PM

I was really hoping that this could be done in UE4.

If I paid your counselling expenses could you have another go at it?

UPDATE: Dunno if you've seen "Sea of Thieves" but it uses the UE4 engine and I tried out the closed beta this weekend and they've pretty much pulled it off. The ships you can crew with your online friends moved about in the world yet you can move around on board as though you're on solid ground.

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

1 answer: sort voted first

Peter L. Newton did something with this. The project was called LocalSimulation for UE4.16.2 although I can't find any mention of it now. I still have the project if you would like me to upload?

From the projects read me...

Why

This was made to allow you to easily ignore world forces for physics simulations i.e. playing catch on a train. Imagine now you can play catch, and the simulation would respond in a way that the world isn't moving at all. Allowing for predictable results in environment that require this behavior.

LocalSimulation

his plugin allows you to essentially create PxScene or Physic Scenes by placing an Actor called Local Simulation Volume, and adding other Static Mesh Components and soon Skeletal Mesh components within this Actor. Adding Constraints, and Forces will work as expected, but now with the additional layer of abstraction so that world simulation can be associated with a transform.

more ▼

answered Apr 15 '18 at 10:33 PM

avatar image

molatov
6 1 2

avatar image Wobbleyheadedbob Apr 16 '18 at 09:37 AM

Yes please!

avatar image molatov Apr 17 '18 at 08:48 AM

You can download LocalSimulation by Peter L. Newton from this location

Note that this solution was WIP and does not contain a solution for dealing with skeletal meshes.

Fortunately, I've found another example that does support this. More information and download link can be found here: Local Field Volume by Irakli

Hope that helps!

avatar image Wobbleyheadedbob Apr 17 '18 at 08:50 AM

Nice one! Thanks, will check it out.

(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