I will have to check I was just using the demo project and cloned one of the vehicles so I changed nothing apart from the mesh.
It works!
Thank you very much, Last_Coin_Games!
This was one of the reasons I went away from Epics vehicles. In FGear, quick overlaps of collisions do throw violently still - however, it seems this comes from PhysX. Enabling sub-stepping and having less complex geometry solves most issues.
Finally I bite the bullet and made the purchase last weekā¦
Just that I am stumbling into a weird crashing error which can only be solved if I commented out body->AddCustomPhysics(onCalcCustomPhysics) in UFGearSkeletalMeshComponent class.
My class structure is a bit complex though⦠simplified explanation is I created a C++ class name BaseVehicle which derive from FGearVehicle. And this BaseVehicle is later made a parent to BP class where only in this bp class that mMesh (vehicle skeletal mesh) is filled (otherwise null). Probably this contributes the crashing error but I am still looking for an answer.
Hi
- Did you add this line :PrivateDependencyModuleNames.AddRange(new string[] { āFGearPluginā }); into Build.cs
- Can you share the error messages when crashing? also does it crash at editor time or at runtime?
- Are the plugin files inside the project or in the engine directory?
I used fgear in a project (4.27) and did the same things as you. I didnāt see any problem.
I have to delete my previous post - because just realized it is different crash error.
Okay here is the stack trace:
Red underline is FGearSkeletal AddCustomPhysics beginsā¦
And it only happens in multiplayer. If I play in standalone in editor (pie), then it is okay.
I have tested on Multiplayer map in FGearAssets. Also tried with customcollisioncomponent and without any collision. It was working. Just crash when i removed physics asset but not same your error code.
Can you share more information with us? Have you tested on fgear sample projects? or what does the c++ class you add yourself contain
Yes I am sure fgear works well in multiplayer mode⦠it just doesnāt run in my case⦠there must be something skipped or unusual in my setup.
It is hard to explain my code without actually giving all the source code⦠ā¦
Well I am just looking for some pointers here or tips which will point me to the right directionā¦
I think I will just look back at the sample or the documentation⦠just double checking.
- try change physics type to simulated in physics asset window. Check substepping in engine
- physics category in project settings.
if only the vehicle part; If you can downgrade it to run in the fgear demo, you can send me the files privately. Else just skeletal mesh and your custom c++ class which inherit gear vehicle.
I still have not solved the problem⦠apparently the bodyinstance (physics) is somehow corrupted or invalid or somethingā¦
I have put the code to check:
if (mBody && mBody->IsValidBodyInstance()) but it still crashed.
This time I think this is probably due to me upgrading the project from 4.19 ā 4.27 and cause all kind of weird issues. So now, I will try to create a new vehicle bp derived from fgear and have it as simple as possible - hopefully this will not crash. And then, I will add back old code slowlyā¦
Yes pls try a blank derived class and use unrealās example vehicle model (i mean skeletal mesh).
Hi, due on UE5 cascade is deprecated, for the update on the official release, means the particles smoke/tyre will be updated for Niagara? or you will drop support/delete that extra features and focus only on physics?
the focus will be on physics of course but we will try to keep the extra features.
Just to update⦠finally I have got the built not crashing. Changes:
-
I moved all the substep stuffs from FGearSkeletal to FGearVehicle because (to me), it make sense as BodyInstance belongs to the vehicle. And I found the call stack to be much more managable.
-
To actually solve the crash, I have to turn on a bool flag before even Vehicleās EndPlay is invoked otherwise the crash comes - it is still accessing the BodyInstance but it is no longer valid? The bool flag when turned on, will skip FGearVehicle::tick (so I run APawn::tick instead). Not really sure why the body physics is not valid but now the code runs fine.
I think this should be easy, but I spend hours looking for answer to no avail lolā¦
How do I make the car reverse? I would like to use a keyboard event, when executed then only it will reverse (no auto reverse).
I have used Set Current Gear before, but didnāt make it (I dont know why). Now I have solved it as this is multiplayer and the code previously run on client. So I moved the code to server, now it is working. I also disabled Auto Change + Auto Reverse.
Looking forward to it too ;), also looking forward to the 5.1 depreciation of PhysX and default engine physics of Chaos, Iām sure Yunus will do a great job for conversion when that time comes.
Iāve been waiting and delaying my project for UE5 which has been a nice break for me also to rethink!
It would be very nice if FGear has deterministic car physics⦠chaos physics seem to hint that except they dont want to mention ādeterministicāā¦lol