D
DyingSilence
Guest
I'm creating a 2D top down action roguelike called Nephilim Hunt, and I want one of my equipable items to be a ball on chain. It would be attached to the character's foot, slowing him down if he's far enough to pull the heavy thing.
Using physics engine for the entire game is a big no-no, I think the game's systems are too closely integrated to not lose months of progress by including one and I've heard that once there's a physics engine, you can't really do movements by coordinate modifications, which is extra inconvenient in my case.
Do you have any idea how to make the ball follow the player on a tether, also respecting enviroment collisions?
My idea for now is to use pathfinding, but that's expensive for a mobile game, or to do a straight raycast from player to ball and in case of a collision, find the nearest "corner", create a marker there, and make the chain bend around the marker, then shortening the whole thing to fit the chain's length.
The second solution sounds moderately good, but I don't know, maybe you, ladies and gentlemen, have something more elegant out there?
Using physics engine for the entire game is a big no-no, I think the game's systems are too closely integrated to not lose months of progress by including one and I've heard that once there's a physics engine, you can't really do movements by coordinate modifications, which is extra inconvenient in my case.
Do you have any idea how to make the ball follow the player on a tether, also respecting enviroment collisions?
My idea for now is to use pathfinding, but that's expensive for a mobile game, or to do a straight raycast from player to ball and in case of a collision, find the nearest "corner", create a marker there, and make the chain bend around the marker, then shortening the whole thing to fit the chain's length.
The second solution sounds moderately good, but I don't know, maybe you, ladies and gentlemen, have something more elegant out there?