|Topic was automatically imported from the old Question2Answer platform.
I’m relatively new to Godot; I’m currently prototyping a sci-fi game with a spaceship.
The mentioned spaceship is visitable and the players have to collaborate to maintain it operative (I get the inspiration from Pulsar, Elite dangerous and Sea of thieves).
The main problem is:
- Every time I control the ship and it rolls character falls out of it.
I have seen the Area’s “space override” option, but I can’t find tutorials about it and I still have to apply it to the character’s kinematic-body
My question is: Is a best choice to continue this way (by creating areas with different gravity, etc.) or is better to create an “inside scene” with the ship insides and an “outside scene” where I have the ship outside and I can see it by a viewport?
Thank you to everyone who answer and sorry for my terrible grammar
Sounds a cool project. I’m not sure whether it’s 2d or 3d or whether it’s multiplayer, (that would be very advanced for someone new to Godot).
Anyway, two obvious approaches:
1: you can reparent the players to make them a child of the ship. Maybe triggered when they collide with the ship.
Once this happens the player Transform will be multiplied by the Transform of the ship and it’ll move with it. You could trigger this on a collision with the deck or whatever. This would be very abrupt but it’s very straightforward.
2: Write a function to add the velocity of the ship to the velocity of the player. You could use a
smoothstep with distance say to make this a smooth transition. It’ll be harder to manage the surface collisions with this technique but it would give the impression of limited inertia.
3: A combination of the two above. Say when the smoothstep hits 1 you could reparent.
ps. Your grammar seems fine to me!
Thank you! I made the reparenting approach and works fine!
Some other issues are emerged but I will make a new post and/or consider the second approach.
Thank you again
Keyron287 | 2021-09-23 10:38