premise, I'm developing a game 2d top down. I created a class called room. If the editor drag and drop my class in the level, everything works fine. But if I create the class at run time, it does not collide in right way with the player. I checked all the preset collision and are setup in the same way into both cases.
sry for my bad english
edit: in the class there are some invisible boxcomponents that serve as walls of the room. These work perfectly. The problem is with the player's movements. After the player receives a movements input, it will not stop, as if he could not collide with the floor of the room.
// Fill out your copyright notice in the Description page of Project Settings.
// Sets default values
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
// Called when the game starts or when spawned
// Called every frame
void ALevelGenerator::Tick( float DeltaTime )
Super::Tick( DeltaTime );
UE_LOG(LogTemp, Error, TEXT("SpawnStartRoom--->STARTED "));
UWorld * World = GetWorld();
StartRoom = World->SpawnActor<ARoom>(ARoom::StaticClass(), FVector::ZeroVector, FRotator::ZeroRotator);
UE_LOG(LogTemp, Warning, TEXT("StartRoom --->IMPOSTATA "));
UE_LOG(LogTemp, Warning, TEXT("nome StartRoom : %s"), *StartRoom->GetName());
UE_LOG(LogTemp, Warning, TEXT("StartRoom --->FALLITA "));
StartRoom->Attiva = true;
Dec 04 '16 at 06:54 PM
in C++ Programming