Exemple #1
0
void ACamera::MoveVertical( float Scale )
{
	FVector move = FVector( 0.0f, 0.0f, Scale );
	FVector location = GetActorLocation( );
	location += move;
	SetActorRelativeLocation( location );
}
Exemple #2
0
void ACamera::MoveHorizontal( float Scale )
{
	FVector move = FVector( Scale, 0.0f, 0.0f );
	FVector location = GetActorLocation();
	location += move;
	SetActorRelativeLocation( location );
}
// Called every frame
void AEquipmentPickup::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );
	t += DeltaTime;
	SetActorRelativeLocation(start + FMath::Sin(t*PI)*25.0f*FVector::UpVector);
	AddActorWorldRotation(FRotator(0.0f, DeltaTime*135.0f, 0.0f));
}
void AGenericProjectile::Tick(float Deltatime)
{
	Super::Tick(Deltatime);

	FVector currentLocation = GetActorLocation();
	currentLocation.Y += ProjectileVelocity;
	SetActorRelativeLocation(currentLocation);
}
Exemple #5
0
// Called every frame
void APreprekaCPP::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);


	/*Neka funkcija*/
	Parametar += Delta;
	float Y = 3 * FMath::Cos(Parametar);
	float X = 3 * Parametar;
	float Z = 3 * FMath::Sin(Parametar) + Parametar;
	SetActorRelativeLocation(GetActorLocation() + FVector(X, Y, Z) * FMath::Sign(Delta));
	/*+0.05 se lepo zaokrugli na ovom kompu, mozda treba dodati dodati neku gresku*/
	/*Kada smo sigli do 2*PI i 0 idemo nazad istim  putem*/
	if (Parametar >= 2 * PI || Parametar <= 0)
		Delta = -Delta;



}