i’m new to godot and game dev in general. i’ve already made a 2d plataformer and a flappy bird clone by myself and figured i might try recreating the game soccer heads. I searched on youtube and learnt how to apply forces and all of that to the rigidbody but if i stand on the ball it launches the player off, and the ball also goes crazy, is there any way to make it so it has normal ball physics?
i have a global variable that checks the direccion of the player, and an area2d on the same player that when the ball enters in it it applies an impulse.
If anyone can help me i would be glad
Applies a directional impulse without affecting rotation.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the “_force” functions otherwise).
This is equivalent to using apply_impulse at the body’s center of mass.
One simple (maybe bad) solution is to make a variable bool is_kicked in the ball, and apply impulse only if not is_kicked?
Thanks! it kinda worked, i just changed the add impulse to an add force, and tweaked the parameters a little and now it’s better. I’ve also implemented the kick action, and for that i used the impulse. It’s not perfect but it’s something, thanks again