My problem is in short that I want to have an object be able to sort of... patrol a certain area. They don't necessarily need the AI to chase after something, but what I would like is for say an enemy to be able to travel in some area and shoot lasers (think like an invader from Space Invaders) while doing so with full control over where they face and where they move (the actual shooting algorithm I've got down).
I tried doing a check for collisions but I have this problem where it checks for the collision, reverses the direction, and presumably ends up colliding with the same object again right after, and so it doesn't keep going in that direction... and I spent a while tweaking it and trying to think up weird solutions but in the end forfeited here because I think there should be a pretty easy way to do this and that I simply can't think of it and ultimately none of my solutions really worked, nevermind how tedious and inefficient they were turning out to be.
Let me know what I can do to help you help me, haha. I did some searches here but couldn't really find what I was looking for, so sorry if something almost exactly like this has been asked before (I feel like it probably has but eh...). Thanks!
Sine behavior do exactly what you want. You may work your events with this behavior. Pathfind is a good option too.
Well, that's certainly a helpful lead. I don't really get how it works but I'll play around and see what I can do and bump this if I have any more specific questions or something. Thanks =)
Multiple Sine disabled at start, enable when you need it.
For moving in a circle, simple with Bullet (Set Angle Yes) with Rotate.
Develop games in your browser. Powerful, performant & highly capable.
Hello, and how could I make that (with Sine behavior) when the object is at the end of the "sine", turn mirrored and go to the opposite way?