Spawning Infinite Tiles - #4 Creating A MOBILE Endless Runner Unreal Engine 4

preview_player
Показать описание
Here we take a look at how we can use blueprint code to spawn the floor tiles into the game. We do this by triggering a spawn tile function when the player overlaps the end of the tile.

►Recommended Playlists
UE4 Level Design

UE4 Blueprints

Virtus Learning Hub // Media
Рекомендации по теме
Комментарии
Автор

For those have issue spwn tile above tile just move the spawn point farther from the tile in master tile blueprint.

MUTER
Автор

for anyone having issues with the tiles being on top of each other and glitching out make sure you forloop is 9 and your box collider is not right on the tile

GoldenYT
Автор

For anyone who keeps falling off the map as it doesnt spawn in a new tile when you touch the collision box, you have to simply change where your spawnpoint is facing. Make sure that the first tile is at Z level 0.

AppleSaucGood
Автор

You need to keep the player somewhere around the origin (like resetting the origin with each spawn), because right now if you run for "half an hour", you'll run into floating-point errors (your coordinates will be too big)

MartinJab
Автор

For those hitting an "infinite loop" error, You may have created your "New Spawn Point" as a local variable. Delete your "New Spawn Point" local variable and "Set New Spawn Point", and drag the pin off of the "SpawnActor Master Tile" and click "Promote to variable" NOT "Promote to local variable".

The local variable will get reset every time the function is called.

pcstalljr
Автор

Hello!
First of all, this serie helped me a lot, i've seen it all and it's very useful.

I always tought that there was something wrong, cause too many obstacles where spawning too frequently, and it wasn't until i added decoration and changed the floor material that i figured out that there is a problem with the tile spawning. (Because i was experiencing z-fighting)


So i did some tests and discovered that the new tiles spawn just in the middle of the current tile (0, 0, 0) instead of spawning at the end (500, 0, 0).

The easy way i found to fix this was by adding a Transform Location between 'Next Spawn Point' and 'SpawnActor Master Tile' (in the minute 4:10), with the values X = 500, Y = 0, Z = 0. And now on, the obstacles spawn way separate from each others.

(because if the tile is a square and there's only one line of obstacles per tile, the distance between obstacles should be at least the same as the tile wide).


I hope this is useful and helps develop your game, i personally want to finish it and try to publish it in the Google Play Store.

MarcosFitnessWorld
Автор

Instead of a delay
Can you show how to destroy once all characters have passed through?
Id like to make a co-op mode

brappineau
Автор

Adding the destroy to the floor tile is kind of pointless. It deletes the floor but all of the other items are still there. A better way is to add a box collision to your ThirdPersonCharacter blueprint and just have it destroy any actor that comes in contact with it. To optimize even more you can delete the box collision on the floor tile and move everything to the box collision on the player. That way it follows behind you cleaning up anything you can't see and adjust the speed with one component. The floor tiles aren't right either, they spawn overlapping half of the last tile. You either need to move the mesh so the back edge is on zero or put the spawn arrow at 1000 instead of 500(depending on floor size).

jeffrowe
Автор

4:23 I'm getting an error in here saying that there is an unexpected K2 Node in SpawnActor

anchitd
Автор

IF YOU ARE RUNNING INTO ISSUE WITH THE INFINITE LOOP USE A CUBE INSTEAD OF A BOX COLLISION. MAKE THE CUBE OVERLAP COLLISION WITH PAWN AND IGNORE WITH CAMERA. USE SAME SIZE CUBE AS YOU WOULD USE THE BOX COLLISION. JUST DO EXACTLY WHAT HE HAS CODED BUT WITH A CUBE NOT A BOX COLLISION

tyla
Автор

Вряд ли ты понимаешь по-русски, но огромное тебе спасибо!!! The best teacher!!!!

kasimtsevdamir
Автор

For some reason my master tile appears slightly higher up than the spawned tiles? The character seems to step down onto the spawned tiles. Any suggestions, I've had a play around with and cannot seem to understand why this is happening...I followed everything as per the video..

shaunpatterson
Автор

its not working it shows me infinite loop detected error in

prasadm.s.
Автор

Who faces infinite loop, just do exactly
First delete the function from third person game mode and copy it to third person character, then in the MasterTilesBb class, delete cast to game mode just cast to third person character and link the function you made in third person character to it, it worked with me

miena
Автор

If have some problems at this stage, you can try this video to build infinite Tile Spawn, so you could move on.

mymaster
Автор

This was very easy to follow. Thank you.

jamiinesbitt
Автор

Holy Moly, this just suddenly got leveled up in difficulty from the previous videos 😂

MMerajHossain
Автор

Great tutorial, I’ve really liked this series! I just have one question, for some reason all of my tiles that are initially spawned are lighter in color than the rest of the procedural ones. Is this just the engine loading in the material, or is there some solution for this?

jordant
Автор

i got an error "Infinite Loop detected in MasterTile, asserted during Contruction Script with the following Call Stack"

Squig
Автор

when i play the game my tiles overlap each other slightly, i thought it was something to do with the box collision but after messing about with it a few times i had no success. id really apprecate any help !

AzaanDarr