This commit is contained in:
2023-08-14 10:45:57 +02:00
parent 171dc24c6b
commit 7c1c80c111
26 changed files with 6 additions and 1 deletions

View File

@@ -204,7 +204,9 @@ void AFireworksPawn::ThrowObject(APickableObject* Object, EControllerHand Hand)
Object->ThrowingHand = Hand;
Object->DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);
Object->StaticMesh->SetSimulatePhysics(true);
Object->StaticMesh->SetPhysicsLinearVelocity(ApproximateThrowVelocity(Hand) * ThrowVelocityMultiplier);
if (!Object->IsRocket) {
Object->StaticMesh->SetPhysicsLinearVelocity(ApproximateThrowVelocity(Hand) * ThrowVelocityMultiplier);
}
Object->ThrowEffects();
}

View File

@@ -47,6 +47,9 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
EControllerHand ThrowingHand;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
bool IsRocket = false;
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
void OnUsed();