kvoeten / UnrealBodyPlugin

An unreal engine plugin for simulating a full body with finger IK in virtual reality.
MIT License
48 stars 10 forks source link

IKBody component causes crash #17

Closed cinerius closed 1 year ago

cinerius commented 1 year ago

I crash when I try to add the IKbody component to the VR pawn

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000002d0

UnrealEditor_UnrealBody!UIKCharacterAnimInstance::UpdateHandValues() [D:\Umberto\UE5_1_VR_Tests - Body\Plugins\UnrealBodyPlugin\Source\UnrealBody\Private\Animation\IKCharacterAnimInstance.cpp:138] UnrealEditor_UnrealBody!UIKCharacterAnimInstance::NativeUpdateAnimation() [D:\Umberto\UE5_1_VR_Tests - Body\Plugins\UnrealBodyPlugin\Source\UnrealBody\Private\Animation\IKCharacterAnimInstance.cpp:43]

kvoeten commented 1 year ago

Admittedly the code is bad since there isn't any checks for it, but line 138 in the repo seems to be: ArmIKValues.LeftTargetTransform = this->BodyComponent->LeftController->GetComponentTransform() * LeftOffset; In this case, it seems most likely that either the BodyComponent is invalid, or the LeftController component is. Can you confirm the setup for both are correct?

kvoeten commented 1 year ago

Clicked the wrong thing, didn't mean to close it.

kvoeten commented 1 year ago

Just added some checks and fixed a strange compile error I had on UE5.1, hopefully it will be resolved with that commit: https://github.com/kvoeten/UnrealBodyPlugin/commit/44ebf089c8160f2570849469cd02acb3c366c9cf

cinerius commented 1 year ago

I tested the fix on a different pc and it doesn't crash anymore. I'll try again with the original project on Monday, but I think it's good, thanks!