Gravity to a certain point?
I see we can change the gravity up, down, and sideways but is there a way to cause a gravitational pull toward a certain point? Similar to a blackhole.
I see we can change the gravity up, down, and sideways but is there a way to cause a gravitational pull toward a certain point? Similar to a blackhole.
Comments
Don't use the scene gravity. Instead, put an "accelerate" or "accelerate towards" behavior in each actor that you want to be affected by gravity. In the behavior you can set the coordinates to where you want the point of gravity to be.
I never use the scene gravity, because the accelerate behavior gives you much more flexibility. For example, you can have different actors have different gravity force.
Yeah I've used that but it creates a more direct line rather then a spiral in to that point.
you want to use vectortoangle to get the angle, and magnitude to adjust the speed. I was able to get a pretty good spiral in my game A Long Way Home.
If there is no other force applied to the actor, it will accelerate straight to the point of gravity. Try adding a little velocity ("change velocity") to the actor, and you'll see it spiral to the point.