Scripting a spaceship

Hi, I have been struggling with figuring out what to use to script a spaceship. Many articles and videos use bodygyro and position but it seems to be deprecated. What would be a good thing to use. I kinda want to make my spaceship like a starwars spaceship.

2 Likes

Read these guides Assemblies and LinearVelocity

2 Likes

Please describe what you need help with in more details if you’re looking for more detailed help.

1 Like

I just don’t know where to start, like how would i go about moving it. What should I use to move my spaceship forward and up and down? Like should I use VectorForce, LinearVelocity or something else.

2 Likes

I think you should use LinearVelocity, that’s what i used in my hot air balloon.

2 Likes

Start with a simplified model and go with any approach to get it moving in one direction, then try and adapt that one step at a time into the actual system you have in mind. As long as you keep making one improvement after the other, you’ll eventually get to some kind of result. This also makes it much easier to help you along each step, because we don’t have to guess everything that you have in mind and can help you with actual, specific programming or design problems.

As for the best way to create movement in your game, that’s impossible to answer without knowing the needs of your game. And TBH it’s really hard for you to figure out your needs if you don’t know the capabilities and limitations of each way. I’d recommend just trying one and seeing. Physics constraints, like Leoristix suggested, are a good place to start. You mentioned BodyMovers in your OP, yes those are deprecated. Use AlignOrientation/Torque/AngularVelocity for rotating and AlignPosition/VectorForce/LineForce/LinearVelocity for translating (“moving”). The exact way to use them depends on your idea of course. Describe what you’re trying to achieve in more detail if you want help figuring out how to achieve a specific kind of movement.

1 Like