Compare commits
4 Commits
e2e32e0092
...
18ab3a5434
Author | SHA1 | Date |
---|---|---|
baz | 18ab3a5434 | |
baz | 11461c7b61 | |
baz | a962301840 | |
baz | 1b32434d98 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Blueprints/HealthPickups/HealthCross.uasset (Stored with Git LFS)
BIN
Content/Blueprints/HealthPickups/HealthCross.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/HealthPickups/HealthPickupMaterial.uasset (Stored with Git LFS)
BIN
Content/Blueprints/HealthPickups/HealthPickupMaterial.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/HealthPickups/TestHealthPickup.uasset (Stored with Git LFS)
BIN
Content/Blueprints/HealthPickups/TestHealthPickup.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
Content/Blueprints/Pickups/HealthPickups/HealthPickupMaterial.uasset (Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Pickups/HealthPickups/HealthPickupMaterial.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Pickups/HealthPickups/TestHealthPickup.uasset (Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Pickups/HealthPickups/TestHealthPickup.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Pickups/LevelKeyPickups/RedKeycardPickup.uasset (Stored with Git LFS)
Normal file
BIN
Content/Blueprints/Pickups/LevelKeyPickups/RedKeycardPickup.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -14,9 +14,8 @@ AStaticMeshPickup::AStaticMeshPickup()
|
|||
void AStaticMeshPickup::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
StaticMeshComponent->SetWorldLocation(this->GetActorLocation());
|
||||
StartingLocation = this->GetActorLocation();
|
||||
|
||||
StartingLocation = StaticMeshComponent->GetRelativeLocation();
|
||||
StaticMeshComponent->SetCollisionProfileName(FName("NoCollision"));
|
||||
}
|
||||
|
||||
|
@ -26,10 +25,10 @@ void AStaticMeshPickup::Tick(float DeltaTime)
|
|||
|
||||
if (StaticMeshComponent)
|
||||
{
|
||||
// Rotate Weapon in desired direction
|
||||
// Rotate StaticMesh in desired direction
|
||||
StaticMeshComponent->AddLocalRotation((SpinRotation * RotationSpeed) * DeltaTime);
|
||||
|
||||
// Bob weapon up and down
|
||||
// Bob StaticMesh up and down
|
||||
const float Time = GetWorld()->GetRealTimeSeconds();
|
||||
const float Sine = FMath::Abs(FMath::Sin(Time * MovementSpeed));
|
||||
StaticMeshComponent->SetRelativeLocation(StartingLocation + ((MovementDirection * Sine) * MovementDistance));
|
||||
|
|
Loading…
Reference in New Issue