BoredEngineer / MMT_Plugin

Machinery Modelling Toolkit (Plugin for UE4)
Other
167 stars 48 forks source link

5.0 Possible? #11

Open OldRavenNL opened 2 years ago

OldRavenNL commented 2 years ago

With UE5 Preview 1 out now I'm curious if this plug-in will be usable in UE5?

I've been holding back testing with the plug-in in UE4 because I've been using 5.0 for a while now. I would love to get this running in UE5.

Tetralogy commented 2 years ago

Seconded. Is there any other plugin out there that helps with substepping?

Tetralogy commented 2 years ago

MMT Plugin does not load in UE5 preview 2.

Javerix26 commented 2 years ago

MMT Plug-in for UE5 would be the meaning of life.

Dealman commented 2 years ago

It does work, but you have to change a few things for it to compile for UE5. I've only tried it briefly, so may have missed some things - but was able to get it to work.

You've got to change this line; https://github.com/BoredEngineer/MMT_Plugin/blob/fef6ac03bd307cb69e2d0e11101a057511096db9/Source/MMT/Public/MMT.h#L5

to

#include "CoreMinimal.h"

Then there were a few warnings of using deprecated functions such as IsPendingKill(), just replace those with IsValid() as suggested by the IDE.

chase03 commented 2 years ago

Could you share your built UE5 version to us please? Many thanks

Dealman commented 2 years ago

It only means it'll start the plugin, the physics will not be working. Read this issue where they corrected me. 😄

Dragomirson commented 1 year ago

I rewrote the plugin for Unreal engine 5 and everything works for me. =)

Dragomirson commented 1 year ago

https://github.com/Dragomirson/MMT_Plugin_5.0

Dragomirson commented 1 year ago

The main problem lay in the file MMTBPFunctionLibrary.cpp which prevented the plugin from being compiled. PhyiscsActor.isValid did not work. To do this, I used FPhysicsInterface::isValid(PhyiscsActor).

chase03 commented 1 year ago

https://github.com/Dragomirson/MMT_Plugin_5.0

Cool! Thanks

Dealman commented 10 months ago

https://github.com/BoredEngineer/MMT_Plugin/assets/7038067/cb72d2a0-5c8d-4894-8ca4-4e7c2745755a

For what it's worth I was able to make MMT work to some extent using the async physics tick that was introduced in 5.2 I think?

The above video is MMT running in 5.3.2, but a lot of the physics is - as expected - not working at a 1:1 ratio. The T26 is set up exactly as in MMT Content, same suspension forces but it behaves a fair bit differently.

Friction also needs some looking at, not quite sure what's going on there but it feels as though it's on ice unless I crank the kinetic friction up a bit but then it also becomes a bit erratic.

But it's sub-stepped and applies forces directly through the chaos physics scene. 🤷‍♂️

I'm obviously no expert at this, but will be playing around a bit more with this - would love to get the suspension and friction to work similarly to the 4.27 version. After which I'm considering refactoring it a bit to make setup a bit more streamlined.