-wyi pluto You don’t want computer learning, right? Try using some algebra and stuff to track the distance, and then use If statements with > and <
ackvonhuelio to find the direction(angle) between two points: var angle = atan2(target.y-subject.y,target.x-subject.x); to have the subject move at that angle: subject.x += cos(angle)*speed; subject.y += sin(angle)*speed;
person stretch the collider into a big circle around the sprite, then anything inside the collider shall be tracked with sprite.istouching if there are several sprites in this circle, make a second, smaller circle
-wyi person wait, what if we need it to be a stealth game? Do you know how to make it so you have to be in their line of sight?
ASmartCoder ackvonhuelio Actually you can make multiple sprites and then set the sprites containing the extra colliders to invisble. Then you can merge the main sprite and the extras into a group and you won't have to worry
-wyi -wyi I would like to make it work like among us basically, but different in the sense that you’re infiltrating an area, and trying not to get shot. You can see both everything in a radius, and anything in your line of sight.
-wyi -wyi the guards can do the same, other than the radius of view. A guard can see you from like, a distance of 8 guards away while you’re moving for up to 15 seconds at a time before they react.
person -wyi you could make an invisible collider in a very specific shape that would be the "line of sight" and if the player touches the collider, then it will shoot a projectile in your direction