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 ?
Hi thomson
Thanks for reply
I m making game like sky dancer (if u have seen it ) on mobile
In my game player has to jump long distance and player keep going forward and down .
I thought of the moving ground instead of player earlier but i have no clue how to do that. Does it mean i have give control to grounds and not to player than my character will b grounds and player will b actor ?
most endless runners ive seen move the ground and have the player stationary to solve this issue. you could probably move the skyspheres location though if you wanted to.
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.
thanks, it really helped me
This is for mobile. So you need something small and lightweight.
Easiest skybox in unreal would be just sphere mesh component inside player pawn. This way it will always move with player, and no extra code on event tick is required.
You can also make skybox actor and attach it to player as blueprint actor component. Even make different skybox actors and spawn them from player pawn construction script.
Now about making skyboxes and textures, spherical texture and material with reflection vector looks great, but such texture may be easily in 200mb range (big nono for mobiles). Instead you can make skybox entirely a shader/material with minimal texture sizes.
Or you can make skybox as BOX, and use 6 textures. Or even better if you know any 3d app like blender: make boxy skybox, subdivide it so each side of that box has about 7x7 square polygons, then morph that subdivided box into sphere, extract single morphed side from that, and you have 1/6ths of nice skysphere. And you don’t need all 6 sides of sphere if you have endless runner that sees only part of sky.