Wall stick/Gravity Controller

Alright, licenses have been added. They’re MIT which I think is pretty liberal with what you can do with it. Go nuts!

12 Likes

Hey-o so a bit of an update post.

I have fixed a few issues/bugs in both these controllers. The main ones being that with the wall stick controller you can now safely sit on seats (with the knowledge that it will disable the controller) and that the camera should work well in follow mode (mobile) for the gravity controller. All these updates have been pushed to the placefiles in the OP.

I also have a few more demos for the wall stick controller. It’s been a very common request so I figured I’d post some of the demos I showed in the OP. However in my opinion the controller really shines while in a real multiplayer game with vehicles or other parts moving around affected by physics.

Cannon.rbxl (120.2 KB)
Flying platform.rbxl (121.2 KB)

Enjoy and good luck!

24 Likes

btw if you are upside down and fall you are actually falling upwards that means ur jumping forever.

5 Likes

One of the things I noticed is you can’t hold jump and keep jumping, other than that, this is super amazing!

3 Likes

This is very impressive stuff. Keep it up!

5 Likes

I’m creating a mahero inspired game with this Galaxy thingie (work in progress) - Roblox

6 Likes

i’m creating a mahero galaxy inspired game

3 Likes

This is great! I’ll be sure to use this for a project sometime soon

6 Likes

do you think you can make one thats just a single script without having to put the modulescripts in places?

ive tried making my own but im having problems with it and i cant get it to work

1 Like

When I first joined Roblox I was always looking for something like this. I found something called Planetary Gravity a long time ago, but it wasn’t that great. This is literally everything I could ever dream of and hope for, good job at making it. Though, I still wish the gravity controller came with multiple “Ignore” parts just like the Wall stick controller did. I noticed people abuse this by jumping and sticking to another player’s torso, making them fly off the map.

4 Likes

You can do this with the gravity controller too.

Every frame I set the gravity up. I do this by checking for the surface normal underneath the character. You could easily adjust the raycasting to ignore certain parts. It’s exactly what I do in the wall stick controller.

12 Likes

I have a question. Does the gravity works to any of the vehicle?

8 Likes

Another update!

Since the gravity controller was so much more popular I took the time to clean it up a bit. The animation and custom state tracking should be a lot better now. In addition I implemented a lot of changes to the function that gets the floor normal. For example, it now ignores other players.

Most of the big changes come thanks to @EmilyBendsSpace’s work. I was able to implement a number of things including a much smoother function to grab the floor normal and the also get the velocity of moving/spinning parts.

Enjoy!

14 Likes

Yet another update, but this time to the wall stick. I actually published these changes to another place as I’ve yet to fully test everything, but as far as I can tell it’s working great!

As the title suggests I’ve completely redone the camera. This means we no longer have that ugly popper cam issue and we also now have the option to smoothly transition to new surfaces.

The big issue is when to actually do the transition and when to snap. If we do a smooth transition while on a constant “up vector” part then we get these ugly jitters. The best way I can think of right now is to manually define when to do the transition and when not to as the developer.

This can be set via Controller.TransitionRate = [0, 1]. Where 1 is instantaneous.

Please let me know if you find any issues!

19 Likes

Okay so weird story I was trying to make some sort of boat thing with the flying platform and may or may not have accidentally created the smoothest train ever.

44 Likes

Could you share the file of that?

3 Likes

Here is train for you
The Smoothest Train

17 Likes

There is an issue where if a player falls off a platform the player is still manipulated and may get stuck if the platform is not horizontal facing upward. Maybe add a timer so if a player is falling for more than a second or is lower than the surface they were standing on then set their gravity to normal.

4 Likes

For that you could either have it set so it would destroy the gravity controller part inside the player if they’re falling too much or you can have invisible walls that can act as a void for all sides of the world so the player would still die as if they fell to the bottom of the world.

3 Likes

One thing I’m wondering on how to change is the sensitivity to it. You can stick to a wall with a 90 degree difference although I’m trying to make it so you have to use a ramp to change walls. Does anybody know how to change this?

4 Likes