Make pawn physics based, for movement use physics thrusters only. Disable gravity. Then use physics constraint to hook pawn to center of sphere. I have prototype of game done like this, but all i can find are quite late backups they are too big and complicated to serve as example. I cannot find early build.
Nawrot, I’m quite new on the Unreal community. So I understand part of your answer. Can you show some blueprints ou something more simple?
PS: Thanks for the answer. ^^
That is the problem i lost blueprints of that game when it was still in simple form. Earliest backup of it i have is quite complicated, it will only confuse you. Anyway I will check once more later today.
Also we discontinued doing that game idea because limiting game area to just orbit of planet limits gameplay, it was just no fun at all.
There are multiple problems with gameplay on sphere, for eg: collision, shooting bullets, line trace for hitscan weapons, enemy AI (you need write it yourself from scratch), polar anomalies everywhere (about everything has potential danger for weird behavior around poles), you need to make everything physics based with constraints hooked to center. So in short a lot of battling against that polar coordinate system, without any real gain in gameplay and fun area.
Then some dillema we totally could not solve:
small planet that fits on screen looks gorgeous, but then you have tine gameplay area, bullets start to sirculate whole planet.
big planet means big game area, but then planet looks just like bent sheet, no point in making game areound planet anymore.
Here’s a couple of alternative ideas for simplified circular movement:
#1
Attach your ship to a Springarm, position it at the centre of the planet and rotate the Springarm - its length is the ship’s distance from the planet’s centre
[HR][/HR] #2
Create a closed spline in a shape of a circle, an arc or an ellipse. You can do it manually in the editor or procedurally, the math is simple enough.
Position the spline at the centre
*GetLocationAtDistanceAlongSpline * and SetActorLocation(ship) - combining it with interpolation will result in smooth movement along the spline’s trajectory
You will need to include some rotation here as well for the ship, but that depends on your game concept
I saw the Vídeo, and it’s more complex than my students idea. We were thinking about a 2D movement, like the ship only travels clockwise and counterclockWise.
They starts to create this on Unity but they get stuck on the spawn of the asteroids and other ships. I convinced them to do it on Unreal, telling then that is much Simplier than Unity.
To be honest, I just need the ship to orbit the planet, not automatically but when the player holds “A” and while they do it or “d”.
At this point I’m felling so frustraded, because it seems to be so easy to do, but now I know that is more complex than I expect.
This fits perfect in what I need. I’m setting the Pawn as default Now, because I was Using the Twin stick one and they don’t recognize this new as standart. Thank you very much for your help, both of you. ^^