New dx ball8/16/2023 Change your paddle's GameObject name to " Paddle". Mark isTrigger of 24 of the box colliders true so that they wont collide with the ball.Ĭreate a layer called " detectorLayer" and make sure that those 24 box colliders are in the "detectorLayer" layer.Ĭreate another layer called " ballLayer" and make sure that the ball's layer is set to "ballLayer".Īttach a collider to your paddle called. ( detector1, detector2, detector3, detector4, detector5.) To detect where the ball hit, the easiest way I know about is to use tiny box colliders.Ĭreate at-least 24 box colliders. Vector3 tempVect = new Vector3( * -1, * -1, ) void OnCollisionEnter(Collision collision) You may have a speedVariable that increases the speed of the ball each time it hits the paddle. It could ether z or x axis but the y-axis MUST be multiplied by -1 in other to go in the other direction. If ball collides with the paddle,multiply the velocity of the ball's rigidBody in all axis by -1, except for the z axis or the x-axis(Depends on how you setup your scene. So multiplying x and y axis rigidBody value by -1 and applying it to the ball should do just that. To change the direction of the ball, all you have to do is to flip the numbers in the opposite direction. Continued abuse of our services will cause your IP address to be blocked indefinitely.You do't change it based on where it hit the paddle. Please fill out the CAPTCHA below and then click the button to indicate that you agree to these terms. If you wish to be unblocked, you must agree that you will take immediate steps to rectify this issue. If you do not understand what is causing this behavior, please contact us here. If you promise to stop (by clicking the Agree button below), we'll unblock your connection for now, but we will immediately re-block it if we detect additional bad behavior. Overusing our search engine with a very large number of searches in a very short amount of time. Using a badly configured (or badly written) browser add-on for blocking content.Running a "scraper" or "downloader" program that either does not identify itself or uses fake headers to elude detection.Using a script or add-on that scans GameFAQs for box and screen images (such as an emulator front-end), while overloading our search engine. There is no official GameFAQs app, and we do not support nor have any contact with the makers of these unofficial apps. Continued use of these apps may cause your IP to be blocked indefinitely. This triggers our anti-spambot measures, which are designed to stop automated systems from flooding the site with traffic.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |