How to make explotin ability in my ball game

Godot Version

`4.3.stable

Question

`how can i make the player rigidboy have explotin ability that push all bodys around him while the rigidbody is controlled by the player like if i hit left clik it active the ability and then ball with area3d active apply_force method and then it push all of the ball around the player but when i make it it push them around the center direction of the world so if i go right it push them left and if go forward like the video it push them again forward

here you see the area3d with collision sphere that animation resscale it in diffrent mask of collision like all the ball in video have make 14 active like here collision also here the body.apply_force is in the enemy ball not from the area3d position


here you see the top script of the player where it call the scenetree and spawn the expolstion

here u see that controlle i make for controlle the rigidbody with input direction but had to change it bit to move correct way

here you see the level that is build just player csg box and enemy ball player have world groups and enemy have enemy world groups

the video here make clear that bug is i can’t make enemy ball move in the direction of the expolition like it active the thy get push forward but when i get to the side it move forward insted fo move in side shortward where the expolition hit it want it to move in that direction

here some images for the porject`

the rigid body player angular_velocity it was adding value to the position value in area3d image so when the player move forward the y in angular y value is adding so the location of the rigid body the player control move the things forward with it and i will try to make it new game of it it more of megnet so when it move and click the start ability button they move with me

here the new code

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.