How to move sky sphere location with player?
I m making endless runner game and as continue to move in one direction , at certain point i ran out of sky. Is there way where i can make that sphere infinite or can move sphere location to player location using event tick or using custom event ?
Moving the Sky:
You can access the sphere in the level blueprint. From there you should be able to use a node that sets the world location of the sphere. Call that node with a tick function and set the new location to the X, Y coordinates of the player, and the Z from the old Location. I don't know how this will effect the lightning of you scene though.
Moving the Ground:
You will need to make your player stationary, and make everything in the world move. Moving everything in the scene might be possible with the getAllActorsOfClass node, combined with a foreach loop and a simillar setup as the above (tick and setworldlocation). Where the new world location would be the old location plus the movement vector of your player. I don't know what would might be the best way to make the player stationary. There might be a checkbox that solves it, or maybe setting the movement speed to 0 might work. In any case it has something to do with the player blueprint or the player controller blueprint.
answered Sep 09 '18 at 05:18 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here