I’m currently turning the player into a sphere and would like to make the sphere move based off VectorForces.
What is the issue?
The VectorForce is attached to an attachment within the sphere. When giving the sphere force, it starts to rotate (as a sphere should), but that also makes the attachment, which is relative to the sphere, rotate as well. I need the attachment’s .Orientation property to act as a gyroscope that always keeps the attachment level.
What solutions have you tried so far?
I’ve looked for solutions. Couldn’t find any, unless I’m searching for the wrong subject.
My own personal solution currently is to counter-act the sphere’s .Orientation property ~ if the sphere’s x axis is 95, the attachments .Orientation is set to 95 on the x axis as well (Keep in mind that attachments orientation does not change whilst the ball is rolling as its relative to the ball. It will stay at 0,0,0 unless the value is manually changed), which negates the rotation of the ball, but the problem is that only works on a 2 dimensonal plane. Once the third dimension is involved, you can’t just negate values and expect it to work. That’s where I am at a road-block, and hope that a math wiz can help me.
Above: The attachment making sure it rotates to counter-act the balls rotation, but when it’s moved off 1 axis it doesn’t work anymore.
Tried it, the only problem I have then is figuring out how to apply force to where the camera is looking.
The current way I was working to do it is have the attachment’s Orientation.Y point in the direction opposite of the camera, which makes sure that when I apply a force on the VectorForce to the Y axis, it will always be straight, where the player is looking.