Wall stick/Gravity Controller

Change the conditions under which you set the new gravity normal

6 Likes

Keep up the great work wow! Love it this looks really cool!

2 Likes

Hello, i have a question. How do i make Trees don’t affect gravity?

I walk to the tree an it changes the gravity to the tree.

1 Like

Is their a way to prevent this sliding when you on the part but have a part of your body of the part a bit.

https://gyazo.com/8a5ada89298f1475c78635aa7006515e

4 Likes

Pardon me if I am misunderstanding, do you mean, “Prevent sliding when hanging over the edge of the part?”

3 Likes

I purposely do not add any default timers or things of that nature because i don’t want to discourage unique use cases.

You can add this in very easily by using humanoid state events on the PhysicsHumanoid.

4 Likes

Imagine how insane it would be to have some sort of 2D Platformer (like Super Mario Bros.) added with wallstick and gravity-control. There could be so many different puzzles and challenges to solve with only using wall-stick and the gravity controller.

I’ve tried combining the script for gravity controller and 2D Platformer scripts and it just breaks the gravity control script.

1 Like

I am not sure what you did but a 2D platforming script isn’t much more complicated than having your camera angled and restricting some movements of the character…

Just edit the cameraModifier and you will be good to go.

1 Like

Is there away to compress this into a single script? I have tried many times but they just crash.

To be blunt, id imagine not.

From what I remember from toying with it the controller works with both the server and the client, and concerting it onto just the server would break it and converting it onto just the client would most likely break it, in addition to making it unsecured.

The wall stick cannot be a single script b/c of this. The gravity controller however can since it’s entirely run on the client.

As for putting it all together… It’s possible, but i have no idea why you’d want to do that.

4 Likes

Can you compress the gravity controller?

1 Like

The cameraModifier script and movementModifier script still work. It makes it look like a real, 2D platform we. However, the Gravity Controller no longer takes effect. When walking up a ramp, the character does not automatically “stick” to the new surface, rather it walks up the ramp like a normal character would without the Gravity Controller.

I just thought of this but if we combined this with shooter games this would get a lot more interesting. You have maps that go upside down and right side up creating many pathways and crazy game play.

1 Like

That is a good point and you can make the bullets bounce off the walls but there is one problem, the map has to be inside of a cube or at least an invisible cube that has kill barriers. But still a great idea

It seems the newest ROBLOX update has broken the camera for both the Wall Stick Controller and the Gravity Controller. I checked your game and even mine (my game is the PK! Gravity Obby) to make sure it wasn’t just me, but it seems it is everywhere. Will the Controllers be receiving an update to fix the cameras? My game is based around the Gravity Controller, so I along with many others could be forced to update it ourselves.

Thanks.

4 Likes

Yes so I was made aware of this last night right as I was about to go to bed. So the problem is extremely simple and I have no idea why Roblox did it???

At the end of the Camera module script usually the cameraModuleObject is returned. However, it seems they’ve added a feature flag specifcially to return an empty table in its place.

New code:

local cameraModuleObject = CameraModule.new()
local cameraApi = {}

if FFlagUserRemoveTheCameraApi then
	return cameraApi
else
	return cameraModuleObject
end

This begs the question, why on earth do this… It’s just an all around annoying move for those of us (like myself) who specifically design our modifications around the fact that the player modules are an ever-changing beast.

I’ll fix it in a few minutes, but I really can’t express how much this grinds my gears. It’s just a big roadblock for no other reason than to be annoying…

Edit:
Okay, all places should be fixed and working now.

13 Likes

Thank you so much for the swift reply. If ROBLOX is going to continue to make these kinds of quick updates, at some point you will most definitely be forced to stop updating the Wall Stick Controller and Gravity Controller. It is just too much work on your part to be forced to constantly change it.

Another thing, I am actually running the older version of the Gravity Controller (the one with canCollide True) because in the updated version you are able to walk up 90 degree walls. I read your reply to another person saying change the gravity normal, but after searching for it in the updated version I was unable to find it. So if possible, could you lead me to the part of the script where this is able to be edited? Thank you for your time.

By the way, I sent you the whole gravity normal question a few days ago in your private messages, so for more info you can look there.

Edit: I ended up fixing it myself.

Have you considered taking the current version of the CameraController module and manually updating it every few PlayerScript updates?
It would be slightly more work, but it should stop these problems happening without warning.

1 Like

It’s a really simple fix.

All you have to do is get a copy of the most recent player module, go into the camera module and then change this:

local cameraModuleObject = CameraModule.new()
local cameraApi = {}

if FFlagUserRemoveTheCameraApi then
	return cameraApi
else
	return cameraModuleObject
end

To this:

local cameraModuleObject = CameraModule.new()

return cameraModuleObject

I likely won’t do that change myself everytime something is updated so that’s part of why I further clarify what I did to fix it. That way future users can update it for their own games.

10 Likes