I’m attempting to get the functionality from the ‘sun direction’ example into my project -
What are the recommended steps for this, it seems the key assets are the Empty and the Light source, I removed the ‘plane’ and the ‘cone’ objects, as they are not required for the feature to work.
Within my new project blend file I’m trying to use Blenders Append and bring in the Empty and Light source from the example blend file.
It also seems like the .hx files need to be in a ‘Sources’ folder within same folder as the blend file, so that they are available to choose in Armory Traits picker
But it does not seem to work when I carry out all of the above - key presses do not move the position of the sun as per config in SimpleRotateObject.hx. is there a completly different way of doing this?
Yes Musa that is what I tried, but I wanted to bring in the minimum of assets from example file. so only appended the Empty and the Light. However key presses does nothing and won’t rotate the sun.
I think the keys listed in - SimpleRotateObject.hx are:
R,T
F,G
V,B
What do you typically append from the example file?
I imported objects that are located in the object folder only and it works on RT,FG,VB. After I deleted the plane and the cone from the scene it still works
I imported only empty from the object folder and set the cube as a child to this empty and the cube rotates.
I created a new project and saved it to a blend file so I can launch the game. I dragged and dropped the blend file from ‘worldSunDirection’ folder. Then I chose Append. then I opened the object folder and imported Empty, I attached cube to it and launched the game.
well what the hell - it seems because I was trying to match the setup of the example sun file - by adding MyTrait to the scene Traits - that caused it to fail, as soon as I removed it things work fine
Not sure why it does not like that being there? but it certainly broke any key press.