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

Feature/mmn 002 paper actor #8

Merged
merged 2 commits into from Mar 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/MirrorMeNot/Private/Actors/PaperPawn.cpp
Expand Up @@ -44,7 +44,7 @@ void APaperPawn::BeginPlay()
Super::BeginPlay();

LevelCollisionObjectParams.AddObjectTypesToQuery(ECC_Level);
LevelCollisionShape.SetSphere(CollisionComponent->GetUnscaledCapsuleRadius() - .1f); // Small offset so collisions against walls aren't detected
LevelCollisionShape.SetSphere(CollisionComponent->GetUnscaledCapsuleRadius() / 2.f); // Offset so collisions against walls aren't detected
LevelCollisionParams.AddIgnoredActor(this);
LevelCollisionDelegate.BindUObject(this, &APaperPawn::LevelCollisionHandler);
}
Expand Down Expand Up @@ -131,8 +131,8 @@ void APaperPawn::SetOrientation(float const InOrientation)

void APaperPawn::QueryLevelCollision()
{
auto const Point = CollisionComponent->GetComponentLocation() - FVector::UpVector * (CollisionComponent->GetUnscaledCapsuleHalfHeight() - CollisionComponent->GetUnscaledCapsuleRadius());
auto const Direction = Point - FVector::UpVector;
auto const Point = CollisionComponent->GetComponentLocation() - FVector::UpVector * CollisionComponent->GetUnscaledCapsuleHalfHeight_WithoutHemisphere();
auto const Direction = Point - FVector::UpVector * CollisionComponent->GetUnscaledCapsuleRadius();

GetWorld()->AsyncSweepByObjectType(
EAsyncTraceType::Single,
Expand Down