Hello, I need to force my starship to move above planet’s surface. (3D)
Its open space so I can’t use colliders
Starship must move where I click while its above. I need that movement similar to movement in game Spore, so it should be able to move to the “circle” and keep always same height distance from surface.
I tried multiple solutions but nothing really works. Starship shouldn’t hit anything while moving towards and it must work in open space without colliders.
I hope its understable.
Thanks
That’s a LOT of requirements! You probably need some kind of PD controller to keep the starship at the correct orbital height while it moves around, assuming that it can move in any arbitrary direction.
You would also need some way to accept a user click and decide if he hit the invisible sphere of where the orbit should take place, and a SphereCollider works great for that. With layers you can make it not collide with anything else, or even turn it off when you’re not clicking.
Either way, start small, move out step by step, because you’re never going to engineer that all in one sitting, trust me.
Step by step is not really possible because i am going to make it for mobile.
Theoretically i could just rotate planet, but itsn’t ideal way.
Good point is that it can’t change Y coords, i will look to it and maybe i will find solution.
This makes ZERO sense. Do you imagine that mobile game developers take an enormous deep breath and type their entire game in all at once and then if it doesn’t work they delete it and start over?!
Traditionally interactive software (such as games) benefits from what is known as iterative development. You build one part, you test, you build more, you test more, etc.
I am not not going to remove anything and start over lol, i already have done whole generating for example, controls too, but i only need to solve movement.
I maybe didn’t understand right, so sorry for it, i thought you mean that i should use step by step movement - so keyboard.
Sure i am going to develop it step by step, not whole at once.
Sorry for my mistake, i am from Czechia so English is not my native language
I recommend starting with Youtube tutorials for mobile games with movement similar to yours.
This will teach you a lot about movement considerations. The main parts will be:
- how to accept user input
- how to determine what user input means (intention)
- how to process that intention to move your avatar