hey, i have been trying to do a space shooter and one of the things i would like to add is some sort of area around an object that pulls other objects into it without changing their rotation. I want to make clear o am not asking for code, all i need is ideas because im out of them, please tell me anny ideas you have. thanks
that is a very easy. Constant force.
You can apply constant force towards any point in the game, for example radially around a point, and with any strength relative to the distance from the point.
So, just find the vector in between the object position and a fixed point on the game, the gravitation centre, and apply constant force strength in function update, to each object, that varies based on the distance from the point, and in the direction of the vector between the object and the point.
the formula itself is about 7 lines, and I highly encourage you to code it because it is a very entertaining and very useful for new visual stuff in unity, I know because I did it with atom electrons simulation spinning around an atomic centre and it was fascinating to see.