What do you want to achieve?
I have a VectorForce with specific rotation that keeps changing in a RunService loop. I want the force that is applied here to be converted to World Axis
What is the issue? Include screenshots / videos if possible!
I’m making a leap system, where you press space and just yeet yourself forwards, like the Hulk. problem is, If I turn myself mid-air, the direction of the force applied changes. I want the direction of the force to stay constant, for which I have to use World Axis on my VectorForce instance.
-- dummyforce "Attachment" is an attachment I only perform rotation on and take worldcframe from.
-- force is actually applied in world axis on the forceInst "VectorForce" instance.
* mult /28
However the above only seems to work when I’m jumping towards the X Axis in World.
Don’t use a world axis! This is why it only works in one direction.
Put a strong VectorForce in the forward and up direction of the player’s HumanoidRootPart but only for a very short time. If you keep applying the Force for any length of time in the HumanoidRootPart it’ll change if you rotate.
VectorForce explains how to apply the Forces at the Attachment0.
I am using the world axis, but I find it easier to change direction of a local force and only apply force in code as v3(0, Force, 0)
What im looking into is converting this force taking into consideration the orientation of the attachment to a world space force.
Here’s a video with the code provided in the parent post.
It’s not that simple. If I have a rotated attachment deciding a vectorForce’s direction, then if I just set it relative to World, it will work on one axis. Z value in local direction would take up any one value in world direction. It does not take player’s LookVector into account. And since I’m updating this force direction on RunService, I would have to find a way to change the direction on this vector3 which would be world based.