I haven’t seen much of anything on how to make something move up and down without a bunch of variables or extensions, so I’m making a short post about it!
We need more posts like this. You can only learn so much from the Wiki.
This does the same. It uses a permanent force and checks the Y values instead of using a collision test. You could change everything to X for the other direction.
There are so many ways of doing things and we constantly change our techniques. I’m sure a room full of people would each have their own favorite way of doing something. It’s all good.
Challenge: Expand this to include 3 checkpoints or waypoints. No rules. With or without behaviors.
Anyone else is welcomed to contribute their ways, too!
That one sounds really useful, especially since i’ve heard that too much collision conditions can slow down the game’s performance because it’s checking collisions for every frame.
I can’t wait to see it. The basic way that I use is to give each object an ID and then either tween it from point to point or add a force toward the object with the next ID and then increase the target ID and repeat.
I played with the concept of using the nearest object while setting a visited Boolean for each point to remove them from the possible pick nearest object condition. It works but not consistently. It depends too much on the placement of the objects.
I forgot about the challenge and I thought you had as well. I was also playing with the same concept but as if they were planets. Instead of hitting the next point, it would slingshot around it. Maybe even gain speed as it gets closer. I forgot about it and didn’t get too far.
Would you like to add a screenshot of what the script could look like?
It’d be cool if this thread could be like a collection of the ways we can make objects move.
And then there would be the statements for the True and False states of the Boolean. It could actually be useful for times when you want movement that isn’t directly up/down or left/right, like diagonal movement!