Hello devs,
I am trying to make a spaceship with LinearVelocity and AlignOrientation. My main goal is for the ship to fly straight forward, and point toward its goal. However, the ship “drifts” out of control since there are no forces acting against its flight.
I want to code counterforces into the LinearVelocity so that every 0.1 seconds, the X and Y directions of the linear force are negative of the velocity, and the Z direction (forward for the spaceship) is the speed of the ship, or 10.
However, when I code this, the ship goes crazy and just flies everywhere, moving faster and faster as it flies.
How would I go about coding this?
Thank you in advance.
If I understand you correctly I think changing the properties of your LinearVelocity will help. You should set ForceLimitsEnabled to false. This would ensure that the only thing that is moving your ship is the LinearVelocity, as any other force would be counteracted (Which I hope is what you were looking to code). Then set RelativeTo to your attachment on the ship, and the VectorVelocity to 0, 10, 0 (Or 0, 0, 10 if the Z direction is foward).