Is possible to somewhat detect collision hit from the FGearCustomCollision? I can do this in the sandbox demo for the truck, but it is never called.
BTW, are there any events/solution for detecting also wheels with objects? I want to play sound when I will drive over canal etc. but the canal blueprint will not detect any hits from the wheels (not even overlaps). Would be good to be able detect hit/overlaps with the wheels for spawning sound or particle on that wheel position. Probably the FGearEffects already doing such checks, could it be exposed?
Hi @rotacak
If you set the custom collision componentās notify rigid body property to true, you can detect the collision event.(1) It will be triggered by āEvent Hitā.(4)
Also you can generate sounds or particles using raycast results for each wheel. You can access the wheel directly from the component (3) as well as from the axle(2)
Please check out the photo
Last Coin Games: thank you very much. Collision hits now works.
Only one thing - I would like to use āInital overlapā from the wheels. To get information when the wheel will touch the object for the first time. But I getting just false for any overlapped object. How to make it work (if it is for this purpose)?
initial overlap is not useful for that task. to get information when the wheel will touch the object for the first time, you just need to keep track of current hit surface, when the hit surface is changed you hit the new surface for the first timeā¦
lazybitgames: I solved it like in the picture below. But is it crazy If you could add calling overlap event for wheels (or axles with wheel identification) in next version, it would be done just in about two nodes instead of this, but donāt know if it is possible for you.
I donāt think that comparing names of traced actors (strings) and casting every new traced object for detecting if it is that my object is good for performance. Better would be create new collision channel just for this situation and that should fire begin overlap event. In that case will be not needed to compare strings and doing casts.
Atleast I limited this solution for car that is driven by me, so I will see. Anyway, great plugin.
Asking because of the post in August. Did you find a way in the original PhysX vehicle implementation for how they stop vehicles from rolling?
Also Iām getting a crash in the UFGearSkeletalMeshComponent. UE 4.25
This seems random but Iāve noticed it very often after a seamless travel to another level. It looks like body instance has a problem with the lower PhysX parts?
Any insights would be useful, thank you.
[2020.09.11-16.42.26:679][705]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff
[2020.09.11-16.42.26:679][705]LogWindows: Error:
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf5916ec7 UE4Editor-Engine.dll!FPhysicsCommand_PhysX::ExecuteWrite() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\PhysicsInterfacePhysX.cpp:673]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf58326fd UE4Editor-Engine.dll!FBodyInstance::AddCustomPhysics() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\PhysicsEngine\BodyInstance.cpp:3265]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdd34d8c58 UE4Editor-Onset.dll!UFGearSkeletalMeshComponent::TickComponent() [FGearPlugin\Source\FGearPlugin\Private\FGearSkeletalMeshComponent.cpp:31]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf4f98386 UE4Editor-Engine.dll!FActorComponentTickFunction::ExecuteTickHelper<<lambda_a11669b3e3f4a9399f884e36456a23d1> >() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h:3471]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf4fbf204 UE4Editor-Engine.dll!FActorComponentTickFunction::ExecuteTick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:976]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf5cd7e0f UE4Editor-Engine.dll!FTickFunctionTask::DoTask() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:283]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf5cdce67 UE4Editor-Engine.dll!TGraphTask<FTickFunctionTask>::ExecuteTask() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:849]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf78d87d8 UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:692]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf78d8aa3 UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:587]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf78ef027 UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1478]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf5cf8e52 UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:558]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf5cfe11a UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1523]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf54bbfff UE4Editor-Engine.dll!UWorld::RunTickGroup() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:783]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf54c6897 UE4Editor-Engine.dll!UWorld::Tick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1558]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf306af57 UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1693]
[2020.09.11-16.42.26:679][705]LogWindows: Error: [Callstack] 0x00007ffdf3941d06 UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:414]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ff62d027800 UE4Editor.exe!FEngineLoop::Tick() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4850]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ff62d03ba7c UE4Editor.exe!GuardedMain() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ff62d03bb5a UE4Editor.exe!GuardedMainWrapper() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ff62d04e31d UE4Editor.exe!WinMain() [D:\Build\++UE4+Licensee\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ff62d05145a UE4Editor.exe!__scrt_common_main_seh() [d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ffe74297bd4 KERNEL32.DLL!UnknownFunction ]
[2020.09.11-16.42.26:680][705]LogWindows: Error: [Callstack] 0x00007ffe753cce51 ntdll.dll!UnknownFunction ]
interestingly physx also has some kind of sticky tire implementation inside but their code did not help at all. i have made some improvements to the sticky tire code that solves some minor problems and it seems to work fine for most cases. normally current sticky tires should also work most of the time, can you share a video of your problem, how much slope does your vehicle stand on?
how do you make the seamless travel to another level? the logs does not tell much, if we can recreate the issue then we might be able to fix it.
It seems that UE4 4.26 has now replaced PhysX with Chaos for the default physics system.
Is this by chance a game changer to resolve the problems with client side replication, I hope?
determinism is the keyword here and it would be perfect if they let us update individual bodies.
is there a place where they list the feature set of chaos engine, could not find anything?
Not that I know of. I was hoping you had more info, haha.
Today i tried 4.26 version for the first time.
I had to comment out some physics related code to get rid of the linker errors and got it working.
First impressions:
-vehicles are shaking more then usual when they are stopped.
-overall driving feels the same/similar for most of the vehicles.
-i got 12 fps in stress test map whereas i got around 70 fps with physx.
I asked the question elsewhere and got this as an answer:
Not sure the ramifications of all this on the prediction issues, hopefully once the problems you mention in the impressions are worked out the new network prediction system might help!
All interesting stuffā¦ looking forward to hearing more.
Hello. Would be possible to add ādefault physic materialā option? I using physic material for skid sound etc. but I have to assign this material everywhere. To every possible object. Would be nice to choose one physic material as the default and assign only different materials there where I want. What do you think?
yes it sounds possible, added to todo list, thanks for the feedback.
Will I be able to use the Niagara effect with FGearPhysicalMaterial?:rolleyes:
FGearPhysicalMaterial contains a couple of extra parameters in addition to regular physical materials so that FGearEffects component can generate sound and particle effects.
FGearEffects component is not meant to be used in production in the first place, we provide these extra components to be used for prototyping or the users can learn from/extend upon them.
We can not support every technology and possible combination of effects in a sample component like this.
We never used niagara before so the answer is may be, if it is required by most people.
Thank you very much. understood.
Recently, Niagaraās effects have increased in the marketplace, so Iām grateful if you support it even when doing prototyping.
Another question
Is it possible to disable FGearOrbitCamera?
When I implement multiple cameras including FGearOrbitCamera, I canāt switch well.
Iām guessing this camera is also for prototyping, but I asked a question.
Hi @ymt3D You can switch camera component between others but you canāt use with orbit camera. I have added disable/enable orbit camera option to todo list.
Also you can see switch camera component in the screenshot.
If you dont want to wait next update you can replace that lines in FGearVehicle.cpp
void AFGearVehicle::CalcCamera(float DeltaTime, FMinimalViewInfo& OutResult)
{
if (mOrbitCamera != nullptr && mOrbitCamera->IsActive())
mOrbitCamera->update(DeltaTime, OutResult);
else
Super::CalcCamera(DeltaTime, OutResult);
}