Wall stick/Gravity Controller

The HRP, or the physics world HRP?

I didn’t get good results on the standard chatter model HRP.

The physics world one works with all sorts of body movers just fine, you just need to make sure you disable them anytime you want the wallstick behavior to work properly.

Using constraints, I did not have to disable them. My gravity is 100% artificial, so the physics world HRP would just float in space if the VectorForce was disabled.

I just had to translate the vector to physics world space.

I’m still utilizing a mostly vanilla wallstick controller. My planets are rotating pretty quick and have complicated collision meshes so using the Gravity controller wasn’t working well. I’m using BodyVelocity for my artificial gravity, and I need to disable it when the player is actually in contact with a planet’s surface, otherwise the velocities of the gravity, rotating body, and the player start conflicting with each other and things get buggy.

Aside from that though, it works really well…

1 Like

Using constraints is a tiny bit less convenient than using the old style body movers.

I could be wrong, but I think more of us would see fewer problems in general if Roblox made a stronger recommendation to switch to VectorForce, AlignPosition, etc.

Then remove more of the code examples that use the old movers. Then show how to replace them. I’ve seen people concede that there isn’t a replacement for body gyro.

But it took me 20 minutes to replace one with a AlignOrientation once I thought it through.

Sorry to vent my frustration. There is just so much obsolete code we are all learning from and not nearly enough examples of how to do things with the newer and better API stuff that has come out in the last few years.

I’m grateful for all the improvements, but it’s hard to keep up sometimes.

Anyway, I think it’s worth switching your code away from the body movers and see if you stop having planet problems.

Switching to constraints didn’t really have the desired behavior. My workspace.Gravity is 0, and the body gyros the wallstick controller uses doesn’t always point towards the gravity source, especially when free floating in orbit. My gravity vector is always represented in world space and when I switched to VectorForce, I couldn’t get it to apply acceleration in the correct direction even when setting RelativeTo to world.

You’re right BodyMovers are more convenient, and since I disable them while actually sticking to walls it doesn’t really cause me any issues. So I think I’ll stick with this solution for now. Of course none of this would be a problem is roblox supported gravity forces on the other axes.

I have a question; I’m using the vanilla wallstick controller and I’d like some help with an interesting issue.

The controller currently has the support for walking on rotating objects, but it doesn’t behave exactly like I would need it to. Take this example:

The model rotates around the red axis, and I’d like the relative normal to always be the green blocks. I’d like the user to be able to climb up the wedge like they would normally and at the same time stay relative to the green blocks, but there doesn’t seem to be any current support for this, how would I go about accomplishing this?

There is support for this. See how both the boots and the teleport set the gravity/relative part.

1 Like

Well I did try this, and it didn’t seem to have the desired effect. I’ll try again to see if I can get a good example to show you, but what most often happened is the that the user would be skewed off at weird angles even while standing on the green blocks. Maybe I just need to play around with it some more.

Ah ok I found out how to do it.

If you’re going to set the wallstick.Normal to something other than the default raycast result, you still need to VectorToObjectSpace on the part’s CFrame. That’s where I was having trouble since I was just trying to set the normal without doing that.

1 Like

Hello! This controller is amazing.
I have a problem tough, I can’t use it for bigger custom rigged characters, it just glitches, player is unable to move or use the gravity controller correctly.
Other issue is, how can i “fix” the shitflock glitch that the camera patch generates?

@EgoMoose can you tell me how to add a whitelist to the wall stick controller non updated camera, i know you have ignorelist but I need a whitelist. I want to make only parts named “GravPart” have gravity work for them. The problem is I do not know how to script very well so can you give me the whitelist code and tell me what script to put it in and on what line. It would be very much appreciated.

When using the gravity controller I was wondering if there was any way to remove the camera rotation?

:slightly_smiling_face: good train

Its fun playing around with it! It is kind of useful for space games, as if there were magnetic boots or something.

Is there a way to make this only apply to one material or surface?

Not sure what wrong i am doing, but i keep on getting this error :confused:
It actully do works sometimes but thats like quite random and rare ( like out of 10 tests it worked only twice )

Which controller are you using and which placefile?

1 Like

Gravity Controller and quite sure the latest file since i downloaded it directly from this place
https://www.roblox.com/games/4597506405/Gravity-Controller

Trying to figure out the problem for a while now but since the system is so vast and I’m new into scripting, its a bit hard for me to figure it.

You must have changed something. Line 168 is blank there’s no way it could lead to the error trace you posted a screenshot of. I’m afraid I can’t help with that.

1 Like