Skip to content

Commit

Permalink
Merge pull request #8 from ShinuziKyura/feature/MMN-002_paper_actor
Browse files Browse the repository at this point in the history
Feature/mmn 002 paper actor
  • Loading branch information
ShinuziKyura committed Mar 19, 2019
2 parents 8ca4fcb + a0020d8 commit d66e0a1
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit d66e0a1

Please sign in to comment.