Open DoctorMikeReddy opened 3 years ago
So, I am assuming the end result needs to be something like Line Rider https://www.crazygames.com/game/line-rider so I will list resources I have identified here, as things that might help us to create objects using the mouse (I'll add notes on how useful they are as I review them):
https://www.youtube.com/watch?v=KakLXqpwnjo - a tutorial for adding clickable objects in a 3D game, so not so relevant to what we want, but showing the mouse events was useful, even if it was out of date
https://www.worldofleveldesign.com/categories/ue4/ue4-getting-started-crash-course.php
https://answers.unrealengine.com/questions/714724/draw-on-the-screen-with-the-mouse.html
https://forums.unrealengine.com/t/draw-simple-line-in-screen-from-x-y-to-x-y/8267
https://www.unrealengine.com/marketplace/en-US/product/draw-system
https://www.youtube.com/watch?v=6FP6pvgh-rs
The effects of this switch are to render the appropriate colour of ledge ghost-like; i.e. the player can fall through them. Firstly, we need to create an InputAction in Edit-> Project Settings -> Engine-> Input: This creates an Event Action Blueprint that can be used in the 2D side scroller controller. We are going to use this initially to just print text to the screen during play; it will not distinguish between left or right buttons yet: but running the game and clicking the mouse buttons now works:
Pushed a commit to repo branch linedraw
Making the mouse pointer show while playing - normally, it disappears after you click in the run window - by altering the player controller BP: Normally, this would be done in a menu blueprint, but as it is part of the game, I have added it to the player controller for convenience. [No point showing a screen shot, as Windows removes the mouse anyway; trust me, this works now]
Pushed to branch. Next is finding a way to distinguish between left and right mouse buttons
I will take your code base and add line drawing objects to it, as an experiment. Do please work on this yourselves as well