Hi Julio,
I wait before do anything like this.
Like I have already say before in a other post,
I don't try to make money with my stuff.
I make this plugin for let's it public.
I just wait to get something ready to use with all newton basic objects and basic joints.
I never have use GitHub for project, I don't have any problem to make one when I come ready about the code.
The real problem I don't have choose again for the final way to implement the manager.
I have try to create a gamemode class with newton manager integrated, but it cause many problems.
The gamemode class is bad idea to use, Because many people use personal gamemode class already.
The gamemode sceneroot and BeginPlay and some other parts behaving differently on gamemode class.
You need to have access to the newton manager from anywhere,
And it need to become the first created component and the first updated component.
It coming complex to make a simple newton component manager.
The newton dll is load when the plugin is load,
The manager need to become create after this,
And all newton objects after the manager creation.
The manager class need to have access to a Tick() update function,
Or you need to do it from a function in blueprint.
The other major problem is about editor mode and final game packaged mode.
The editor can do simulation in blueprint for test your stuff, and in the editor you can play the total scene.
It is where the order to create the manager and the newton object become important...
The simulation and the playmode from the editor do not execute or use all the same way order or functions.
I get a other problem to transform the objects normally too.
I can't use NewtonTransformCallback normally, I need to do it manually.
I can call NewtonTransformCallback for any objects, I can modify a simple variable inside the callback.
The problem start when I try to modify the object transform from the NewtonTransformCallback, It give a error.
I think it happen because multithreading race condition between newton and unreal thread.
I have try to put a lock, but it don't seen to work.
Maybe to make it work I need to disable the Tick() from any newton objects and let's only the manager have the Tick().
The transform in unreal is surely updated from the tick update, maybe it conflic with newton.
For now I set the manager tick update to PrePhysics, And I set the object tick to DuringPhysics or PostPhysics...
In the NewtonTransformCallback I set the transform to the object but I don't apply it, I set a personal flag TransformUpdated.
In the object tick I read the personal flag TransformUpdated and I update the transform if it have change.
It's the only working way that I have find for now.
Any commands to transform a ut object in NewtonTransformCallback crashing..
You can only assign the value and update the component transform outside the callback.
I don't have try to hack unreal engine loop,
I know where to modify the engine loop but I don't think to touch or modify it.
I'm not sure if it is possible to get a better way about the transform without modify the unreal engine code.
One good thing with this method you can continue to query physx and mix it with newton,
For exemple interacting with particles collision or fracture particles or bullets collision & playercontroller...
I need to test more but currently it give nice results.
With this way your are limited to configure the newton step with the physx step setup value.
Currently to get all working in good order the best I have find is to create the manager in a modified actor class.
On this way I can create all newton object as children, and edit or simulate it anytimes without take care about manager order creation or update.
The order is important because all meshes is create with newton and the manager need to become created if you like to display mesh in the editor mode.
I have choose to try this way for now, I'm close to have something to share in public.
I currently work on my custom mesh object to get the visual in the editor mode, And I need to add joints.
The visual c++ intellisense is very slow with ut plugin + the whole compile time, sometimes it become long to just change little things and tests hehe
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
.
Sorry about my english explanation...