So you need to learn how keyboard input works and how to make physics objects move on them. Two more physics objects which move rapidly on keyboard input. Unity and Unreal won't even need any programming for that (not even visual programming). In order to do that you need to find out how to use the physics engine of your game engine. Deconstruct the idea of the game into the individual technical challenges it poses, and then find out how to solve those.įor a pinball game, the first thing would be to have a ball rolling down an angled plane with a bunch of solid objects on it. When you want to learn enough to create a specific game, then don't look for tutorials about that specific game. If you run into trouble with any of the code I probably will be able to help eventually, but you can google how to add force to something and get some YouTube result. ![]() Whenever the player is not pressing the paddle button you’re going to want to have a less intense addtorque2D push the paddle back. You don’t want the paddle to just spin in circles, so the simplest solution might to add a hingejoint2D component and set the min/max angle to that of a normall. Now some code: since pinball is a physics simulation you’re going to want to use a large and continuous addtorque2D to the pinball paddle whenever you press a certain button. Maybe make some walls of the pinball arena out of box2D colliders. It should auto generate a collider for you, but polygon2D is easy to tweak check out a tutorial if you need. Continuous collision detection is important because you’ll be hitting the pinball very hard and you don’t want the paddle to glitch through the ball.įor the paddle: make a new game object with a pinball paddle sprite and a polygon2D collider (also add continuous collision detection to this). ![]() If I were you the first thing I’d experiment with is how unity handles a ball and a pinball-paddle.įor the ball: Get a simple circle sprite and give it a 2Dcirclecollider, then give it a rigid body 2D with gravity and continuous collision detection set to on (collision detection should be an option in the rigidbody2D inspector settings). ![]() I’m currently checking Reddit in my car with the heat on before I go back to reading, so I can only point you in the right direction (for now). Right now I’m in Austin Texas and power has been out for the whole city for a couple of days. dunno what happened to op but I’d be happy to help.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |