Hello world!
I am new to unity and horribly stuck with one bit off code. I am building a simple ‘block breaker’ game that looks a bit like the classic game arkanoid. The game works, but I don’t like the behaviour. When the ball hits a corner of a game object it often flies off (somewhat) horizontally. I want to limit this range so the ball always goes up/down ward with an angle of at least 20 degrees.
I managed to calculate the angle with which the object is hit. Also I have an if statement. Currently I use the AddForce function. I am unhappy with how this works because it alters the speed of my object, rather than only the direction. I have also tried to rotate my object, but that only resulted in my object facing the other way. Is there anybody here who can help me to change the outbound angle? Thanks!