New stuff
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Particles/P_BlockDestroy_Explosive.uasset
Normal file
BIN
Content/Particles/P_BlockDestroy_Explosive.uasset
Normal file
Binary file not shown.
BIN
Content/Particles/P_BlockDestroy_Flying.uasset
Normal file
BIN
Content/Particles/P_BlockDestroy_Flying.uasset
Normal file
Binary file not shown.
BIN
Content/Particles/P_BlockDestroy_Multihit.uasset
Normal file
BIN
Content/Particles/P_BlockDestroy_Multihit.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -201,6 +201,7 @@ FVector AFireworksPawn::ApproximateThrowVelocity(EControllerHand Hand)
|
|||||||
// Throw object
|
// Throw object
|
||||||
void AFireworksPawn::ThrowObject(APickableObject* Object, EControllerHand Hand)
|
void AFireworksPawn::ThrowObject(APickableObject* Object, EControllerHand Hand)
|
||||||
{
|
{
|
||||||
|
Object->ThrowingHand = Hand;
|
||||||
Object->DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);
|
Object->DetachFromActor(FDetachmentTransformRules::KeepWorldTransform);
|
||||||
Object->StaticMesh->SetSimulatePhysics(true);
|
Object->StaticMesh->SetSimulatePhysics(true);
|
||||||
Object->StaticMesh->SetPhysicsLinearVelocity(ApproximateThrowVelocity(Hand) * ThrowVelocityMultiplier);
|
Object->StaticMesh->SetPhysicsLinearVelocity(ApproximateThrowVelocity(Hand) * ThrowVelocityMultiplier);
|
||||||
@@ -274,7 +275,7 @@ void AFireworksPawn::TryUpdateLasers()
|
|||||||
FVector EndLocation = StartLocation + (WidgetInteractionL->GetForwardVector() * WidgetInteractionL->InteractionDistance);
|
FVector EndLocation = StartLocation + (WidgetInteractionL->GetForwardVector() * WidgetInteractionL->InteractionDistance);
|
||||||
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitL, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitL, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
||||||
LaserL->SetHiddenInGame(false);
|
LaserL->SetHiddenInGame(false);
|
||||||
LaserL->SetRelativeScale3D(FVector((CurrentLaserHitL.Distance >= 5.0f ? CurrentLaserHitL.Distance : 1000.0f), LaserL->GetRelativeScale3D().Y, LaserL->GetRelativeScale3D().Z));
|
LaserL->SetRelativeScale3D(FVector((CurrentLaserHitL.bBlockingHit ? CurrentLaserHitL.Distance / 5 : 1000.0f), LaserL->GetRelativeScale3D().Y, LaserL->GetRelativeScale3D().Z));
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Right Hand ---
|
// --- Right Hand ---
|
||||||
@@ -284,6 +285,6 @@ void AFireworksPawn::TryUpdateLasers()
|
|||||||
FVector EndLocation = StartLocation + (WidgetInteractionR->GetForwardVector() * WidgetInteractionR->InteractionDistance);
|
FVector EndLocation = StartLocation + (WidgetInteractionR->GetForwardVector() * WidgetInteractionR->InteractionDistance);
|
||||||
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitR, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitR, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
||||||
LaserR->SetHiddenInGame(false);
|
LaserR->SetHiddenInGame(false);
|
||||||
LaserR->SetRelativeScale3D(FVector((CurrentLaserHitR.Distance >= 5.0f ? CurrentLaserHitR.Distance : 1000.0f), LaserR->GetRelativeScale3D().Y, LaserR->GetRelativeScale3D().Z));
|
LaserR->SetRelativeScale3D(FVector((CurrentLaserHitR.bBlockingHit ? CurrentLaserHitR.Distance / 5 : 1000.0f), LaserR->GetRelativeScale3D().Y, LaserR->GetRelativeScale3D().Z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,9 @@ public:
|
|||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
bool IsHeld;
|
bool IsHeld;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
|
EControllerHand ThrowingHand;
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||||
void OnUsed();
|
void OnUsed();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user