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"

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 ?

Product Version: UE 4.19
more ▼

asked Sep 09 '18 at 02:04 PM in Blueprint Scripting

avatar image

3 2 5

avatar image ThompsonN13 Sep 09 '18 at 02:27 PM

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.

avatar image HVS_RHS Sep 09 '18 at 02:38 PM

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 ?

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

1 answer: sort voted first

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.

more ▼

answered Sep 09 '18 at 05:18 PM

avatar image

474 29 43 67

(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