Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert footstep trace to kismet version #219

Conversation

muchcharles
Copy link
Contributor

There were compile issues in the change to reduce allocations in
footstep traces. Revert back to the kismet version, but use MeshOwner
as the world context object so that bIgnoreSelf can ignore it. That
way MeshOwner->Children can be used directly as the rest of the ignore
list, avoiding the allocations.

There were compile issues in the change to reduce allocations in
footstep traces. Revert back to the kismet version, but use MeshOwner
as the world context object so that bIgnoreSelf can ignore it.  That
way MeshOwner->Children can be used directly as the rest of the ignore
list, avoiding the allocations.
@dyanikoglu
Copy link
Member

What kind of compile issue we're talking about? As far as I know, the code compiles fine in current state?

@muchcharles
Copy link
Contributor Author

Someone in discord, building on Mac.

They got:

'ENABLE_DRAW_DEBUG' is not defined, evaluates to 0 [-Werror,-Wundef]

Which was fixable with adding:

#include "DrawDebugHelpers.h"

But then they still got:

In file included from /Users/username/Documents/Unreal Projects/MWORLD/Plugins/ALS-Community-main/Intermediate/Build/Mac/x86_64/UE4Editor/Development/ALSV4_CPP/Module.ALSV4_CPP.cpp:14:
0>/Users/username/Documents/Unreal Projects/MWORLD/Plugins/ALS-Community-main/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp:63:101: Error  : use of undeclared identifier 'TraceColor'
                        DrawDebugLineTraceSingle(MeshComp->GetWorld(), FootLocation, TraceEnd, DrawDebugType, bHit, Hit, TraceColor, TraceHitColor, DrawTime);
                                                                                                                         ^
0>/Users/username/Documents/Unreal Projects/MWORLD/Plugins/ALS-Community-main/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp:63:113: Error  : use of undeclared identifier 'TraceHitColor'
                        DrawDebugLineTraceSingle(MeshComp->GetWorld(), FootLocation, TraceEnd, DrawDebugType, bHit, Hit, TraceColor, TraceHitColor, DrawTime);
                                                                                                                                     ^
0>/Users/username/Documents/Unreal Projects/MWORLD/Plugins/ALS-Community-main/Source/ALSV4_CPP/Private/Character/Animation/Notify/ALSAnimNotifyFootstep.cpp:63:128: Error  : use of undeclared identifier 'DrawTime'
                        DrawDebugLineTraceSingle(MeshComp->GetWorld(), FootLocation, TraceEnd, DrawDebugType, bHit, Hit, TraceColor, TraceHitColor, DrawTime);

I couldn't find where those are actually defined (the only place seemed to be defined privately/impl in CollisionDebugDrawing.cpp in namespace CollisionDebugDrawing).

@muchcharles
Copy link
Contributor Author

And alternate change is probably to just set the undefined variables to the literals FLinearColor::Red, FLiniearColor::Green, and 5.0f, which was what the kismet library is defaulting them to. A benefit of the non-kismet call is it has a specific trace tag that could be used for profiling.

When I looked into it more I realized the kismet bIgnoreSelf uses the world context object as self, and by changing that it was then ok to just pass the ignore actors list as the Children array directly.

@dyanikoglu dyanikoglu merged commit 06613da into ShadowfallStudios:dev May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants