This code is supposed to add the movedirection vector of the humanoid to the rotation of the camera, but it doesn’t. The reason why I need this, is because I’m trying to “unlock” the character movement. Usually you can only move on a plane that looks like this: 0, 1, 0. Flat. But I want the plane of movement to be parallel to the orientation of the camera. If you were looking directly down, pressing w would allow you to move directly down, A, left, and S up. Don’t worry about how I’m getting the character to move directly up, I just need this vector.
I think the problem could be because you are using the movement of the player and not the LookVector of the HumanoidRootPart, but that could just be me, from what I know this way you will only get your effect if your are moving
Ok, I’m not a programmer but I think I might be able to explain it, first, the
function rotateVectorAround( v, amount, axis )
This should create a function that gets when the vector is rotated, I don’t know what v is, but amount should be the offset (ex. 130) and the axis is the axis, now
This returns the CFrame with the axis and the offset (ex. 130 on the X axis) but I don’t know what VectorToWorldSpace means, sorry, and now
end
This is probably the hardest part to understand of the script, it ends the script.
Sorry, I’m not a programmer, I don’t garantee that this is what the script means, but from my little understanding of scripts this is what I interpreted from it, have a good day/night
I don’t think everyone understands what I’m trying to do. Right now with normal character physics, you can only move forward, backwards, left, and right. I want the character to be able to move in those same directions, but relative to the camera. How? What math would I need?
Ok, you first have to get the axis and offset of the camera, @Morghuls’s script does that, and after that you will have to modify the behaviour of the commands of the movement of the player, from what I understand you are trying to make the effect of being underwater in first person but In third person and out of the water? Right?
Ok, then you could try and fill the world with a block and make a script that makes the player have the swimming state activated, but there’s still the problem of the camera thing, but this would make the problem of going up/down solved
That’s a really good idea, but I want there to be some kind of ball physics. Swimming is just linear. I want them to be able to speed up, slow down etc.