This had to have come up already, but I cant find it...
I want a black hole to change the physics path of a moving object.
I have an Sprite moving across screen, passing near black hole using physics:
Every Tick
-> "SPEED"=Distance(0,0,Sprite.physics.velocityX,Sprite.physics.velosityY)
-> "DISTANCE"=Distance(BlackHole.x, Blackhole.y, Sprite.x, Sprite.y)
Sprite.Distance <500
-> Sprite Apply "FORCE" at angle(sprite.x, sprite.y, Blackhole.x, blackhole.y)
QUESTION - How do I calculate "Force" so that it is stronger proportionally to the distance of the hole as the sprite gets closer. I have racked my brain, but cant get it.
Help Please...