Hello, I’m working on a basic breakout style game and I’m using the physics to simulate the ball movement. I tried to use projectile component but it’s harder to control (i think) once you shoot the ball, that’s why I’m not using it now.
My question is, I’m able to read the velocity of the ball each tick but not override it. Set Physics Linear Velocity always sets it to 0 somehow. What am I missing?
Hello, I am guessing the only force acting on the ball is gravity, if that is so, untick “Enable Gravity” or call “Set enable gravity” node in blueprint and set it to false. If gravity is disabled, please write about other forces that are constantly applied to the ball.
Thanks for the reply. I’m not using gravity because I don’t need the ball to go down, I need it going at a constant speed and bouncing off stuff.
Edit: The ball is spawned with an “Add Impulse” node and it works but after that I can’t limit the ball’s speed and it gains too much speed if I hit it with the paddle.
It displays the correct value at ball launch. Also, after trying it with “on event hit” instead of every tick it works. I guess it has something to do with how tick works in Unreal, I’ll try changing the code and maybe use plain movement instead of physics. Thanks for the help.