I’m trying to make a simple black hole force effect.
The problem is that when the BlackHole applies its force, it only effect the Y Axis, here’s my code:
PlayerMovement (1st), BlackHole (2nd):
I know that changing the velocity or using Addforce
in Attract()
Method doesn’t affect the Velocity.X
of the player because the velocity.X
itselsf keeps changing (based on “move” variable) in the PlayerMovement's FixedUpdate
.
I don’t know how to change my code so the player can move as it does, and at the same time get affected by the BlackHole’s physics on both Axis (X and Y) (when approching it)