I’m fairly new to unreal engine and game development in general
i wanted to make my own version of the light bike game for fun (LightBike 2 - Free Game - Review Gameplay Trailer for iPhone/iPad/iPod Touch - YouTube).
so basically its a multiplayer 1v1 game in which the 2 bikes spawn in an arena, they leave behind a wall of light wherever they travel. the game is over when one of the player crashes into the wall.
so thats it, i need help for the logic on how to spawn that wall of light along the entire path the bike travels?
just the logic/basic idea will suffice as i am well versed with blueprints, however an example blueprint will also be appreciated!
Thanks for your time.
every time you turn the bike 90 degrees, spawn a 1 unit wide LazerWall actor, which contains a static mesh, with its pivot point in the bottom corner, with an emissive material, and set its collision to overlap all. set its rotation based on the bike’s rotation, and keep a reference to that actor within the bike blueprint. every tick, within the bike blueprint, set the scale of the wall based on its distance from the bike. the bike should have a collision sphere on the front, and on begin overlap event, stop the bike from moving, spawn an explosion particle effect, create a game over umg widget, and add the widget to viewport.
make sure the collision sphere is far enough towards the front of the bike that it doesn’t touch the current wall being placed, and just in case, you might want to compare the overlapped OtherActor to the wall actor reference, to make sure they are different before killing the player, to avoid the player getting killed by their current tail.
how do i scale the wall, while keeping 1 end of the wall at the same spot since scaling increases its length in both directions, otherwise i think your method is best.
put the wall’s pivot point on the bottom corner of the mesh, so it scales from the pivot point.
http://udn.epicgames.com/Two/WorkflowAndModularity.html#The%20Origin