Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Invisible/Ungettable/Non-Existant Directional Lighting created...?

This is my constructor:

 ADayTime::ADayTime(const class FPostConstructInitializeProperties& PCIP)
     // Default values
     DayLength                = 240; // 4 hours
     YearLength                = 168;
     CurrentGlobalDayTime    = 120.0f;
     CurrentGlobalDay        = 84;
     CurrentGlobalYear        = 1;
     bTimeIsFrozen            = false;
     LocalLatitude            = 45.0f;
     UpdatesPerDay            = 3600; // Every 0.1°
     NextUpdate                = 0.0f;
     // Create the Atmospheric Fog and Directional Light Components for the Sun
     AtmosphericFogComponent = PCIP.CreateDefaultSubobject<UAtmosphericFogComponent>( this, "DaylightAtmosphericFog", true );
     SunLightComponent = PCIP.CreateDefaultSubobject<UDirectionalLightComponent>( this, "DaylightDirectionalLight", true );
     // Set the Direction Light and Atmospheric Fog Settings
     if( SunLightComponent && AtmosphericFogComponent )
         // Atmospheric Fog
         AtmosphericFogComponent->bVisible = true;
         AtmosphericFogComponent->SetMobility( EComponentMobility::Movable );
         AtmosphericFogComponent->SunDiscScale = 1.6f;
         // Direction Light
         SunLightComponent->bVisible = true;
         SunLightComponent->SetMobility( EComponentMobility::Movable );
         SunLightComponent->SetCastShadows( true );
         SunLightComponent->bAffectDynamicIndirectLighting = true;
         SunLightComponent->IndirectLightingIntensity = 0.3f;
     // Activate the Tick function
     PrimaryActorTick.bCanEverTick = true;

I create 2 components, a Directional Light and Atmospheric Fog... For some reason there are now 2 directional lights. One I control over that pointer which works fine, just like the atmospheric fog that does what its suppose to. Then there is another directional light which seems to have melted into my actor which is nothing more than a AActor.

I can change the direction of the "shouldn't be existing"-lighting by changing the rotation of my actor in the scene, which shouldn't do anything because I don't set a RootComponent. I have printed out all components with GetComponents(), but that only shows the 2 I actually added.

This completely messes up my scene lighting, is there something I did wrong? Am I not allowed to add 2 components or something like that?

Product Version: Not Selected
more ▼

asked Aug 03 '14 at 12:05 PM in Bug Reports

avatar image

308 12 117 40

avatar image Tim C ♦♦ STAFF Aug 04 '14 at 06:07 PM

Hi Tingle,

What versions of the Editor and Visual Studio are you using? Do you see this same behavior if you create a new project from one of the templates and recreate this actor in the new project? Would you be able to provide the full .h and .cpp files so I can try to reproduce this issue?

avatar image xC0DEB10C Aug 04 '14 at 07:38 PM

.h http://hastebin.com/himopohayu.vala

.cpp http://hastebin.com/teganimapo.coffee

Ill try in a new project, Thirdperson C++ run from VS as DebugGame Editor -> Debug -> Start new Instance

Think you could also give me some tipps on this issue as well? https://answers.unrealengine.com/questions/78344/tassetptr-not-valid-on-restart.html its a real deal breaker atm.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Ok I tried it, it works fine in the new project - I don't have the translations either which is what I have in the original project which shouldn't be there...

Also, the TAssetPtr problem I have doesn't exist there either... I don't need to reload the assets...

So what could it be?

more ▼

answered Aug 04 '14 at 07:54 PM

avatar image

308 12 117 40

avatar image xC0DEB10C Aug 04 '14 at 07:59 PM

Ok I feel like an idiot now... I recreated the actor and everything works as intended... the Asset thing works fine as well. Guess I should recreate actors when ever I do new things like adding components or assets.

But I suppose it's still a bug/issue for bugging up over time :/?

avatar image Tim C ♦♦ STAFF Aug 04 '14 at 10:49 PM

I'm glad to hear that everything seems to be working for you now.

We recently did some work on an issue where Blueprints were not being updated when the class they were derived from was changed. This sounds similar to that issue. Do you happen to know what changes you made to the class before this issue started happening?

avatar image xC0DEB10C Aug 05 '14 at 10:41 AM

The issue with the TAssetPtr not working seemed to have been right from the start, when I added them.

And the issue with the non-existant light which seemed to be the root component showed when I added the UAtmosphericFog component to the class.

avatar image Tim C ♦♦ STAFF Aug 05 '14 at 06:48 PM

I did some experimenting with removing and re-adding the UAtmosphericFog component in the class and was not able to see any behavior like you had described. If you happen to run into something similar again, please let us know.

Making changes to the base class that you are deriving Blueprints from should become a smoother process in the future. We apologize for any inconvenience that you are currently experiencing.

avatar image xC0DEB10C Aug 05 '14 at 06:49 PM

Thing is, I'm not using blueprints :P

avatar image Tim C ♦♦ STAFF Aug 05 '14 at 07:07 PM

Oh, sorry. I thought you were creating a Blueprint from the Actor you created, then placing the Blueprint in the level. In your case, it should not be necessary to recreate your Actor class any time you want to add a new component.

I am curious, when you noticed the unusual behavior from your Actor, did you try doing a clean rebuild in Visual Studio?

avatar image xC0DEB10C Aug 05 '14 at 07:08 PM

No, I didn't do a rebuild, all I did was recreate the actor to fix it as mentioned above.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question