Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Petia Davidova | |
Old Version | Published before Godot 3 was released. |
Hello,
I am currently in the process of making my very first game(for Android phones). The basic idea is there is ball with initial direction and speed, going up at some angle, not falling, and it bounces off the edges of the screen. The player tilts their phone and the ball’s bounce direction depends on the incline of the phone. The picture shows what I want to happen if the phone is perfectly upright. If it is tilted the bounce angle would obviously change
I am not sure whether to use RigidBody2D or KinematicBody2D. I implemented it with KinematicBody at first, but I don’t know how to change the speed, while keeping the same direction (the ball should go faster and faster as level up). But since the ball is actually not controlled by the player directly, I thought maybe RigidBody. But I cannot work out the angular and linear velocities, is there a way to change the speed of movement without changing the direction. I just need to control the direction/angle and speed of the ball. Any advice would be greatly appreciated, as I feel a little lost. Thank you!