PlaceholderGames / 2122-yr1-team-uncreatives

CS1S464 2021/22 Team Uncreatives
0 stars 0 forks source link

Going to create a new branch "linedraw" so I can mess with code for drawing objects in the scene #5

Open DoctorMikeReddy opened 3 years ago

DoctorMikeReddy commented 3 years ago

I will take your code base and add line drawing objects to it, as an experiment. Do please work on this yourselves as well

DoctorMikeReddy commented 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://answers.unrealengine.com/questions/367303/how-to-create-an-object-on-mouse-click-from-a-choi.html

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

https://www.youtube.com/watch?v=jWVUr-i5zaM

https://www.youtube.com/watch?v=6E5WUcl2spQ

DoctorMikeReddy commented 3 years ago

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: image 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: Adding Mouse to controller but running the game and clicking the mouse buttons now works: Hello World

DoctorMikeReddy commented 3 years ago

Pushed a commit to repo branch linedraw

DoctorMikeReddy commented 3 years ago

Making the mouse pointer show while playing - normally, it disappears after you click in the run window - by altering the player controller BP: image 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]

DoctorMikeReddy commented 3 years ago

Pushed to branch. Next is finding a way to distinguish between left and right mouse buttons