0 votes

So this is a question that does sound a bit ridiculously simple, but I also I am really new to Godot and I have been learning godot for only few months so that's why I am asking. So I'm making a 2D platformer and I want to have an obstacle that bounces around. I have looked around for tutorials on how to make an object bounce around, but I haven't found a tutorial where I can make the object bounce independently without player input. I just want my obstacle to just bounce around the stage. Any help is a appreciated.

Godot version 3.3
in Engine by (32 points)

1 Answer

0 votes

You can have invisible walls (collision area without a sprite) around whole level to make sure it doesn't get out it.

If your level is bigger than screen and you want to bounce around visible area, you can add that invisible wall into the Camera2D scene.. so it moves with your camera together and will always be just behind the edge.

by (195 points)

Ok, but I want it to start at a certain position outside of the players view and bounce around that specific area of the level. I don't want it to necessarily bounce around the the entire level or bounce around only the players camera.

Then it's all the same, if it's specific area, just place an Area2D there and give it proper collision layer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.