Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. FVector test = FVector::VectorPlaneProject(StaticMeshComponent->GetForwardVector(), surfaceImpactNormal);
  2. FVector surfaceForwardDirection = StaticMeshComponent->GetForwardVector() - test;
  3. FVector force = (surfaceForwardDirection* m_forwardAcl) * AxisValue;
  4. force = force * GetWorld()->DeltaTimeSeconds * StaticMeshComponent->GetMass();
  5.  
  6. StaticMeshComponent->AddForce(force);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement