First person Movement on a sphere (with jumping) is this possible?

do you need other objects to fall towards the planet or just the player

1 Like

Other objects would be nice, eg. a spaceship, or other entities like alien life.

Well idk man. If you want multiple planets like super mario galaxy then thats gonna be fairly tough, at least for me.

You can either:
A) use collision to detect tags of new planets and gravitate towards them

B) if you have different scenes or just different planets you can enable/disable custom players for each planet

1 Like

or just have a distance check to the closest planet, but that would mean all the planets need to be the same size

Depends on the scene setup as well. I may go with the tags as I’ve done that before, once you enter atmosphere, gravitate to center of planet (or whatever the kenimatic system does) and allow the player to move, in space I want more of a free camera movement at local scale so it’s more space like.

Not to be rude, but you’re not helping much. You’re kinda giving useless feedback.

I’m still mostly wondering the code or way to move along a sphere in first person, the kenimatic system looks pretty good but I couldn’t find the script, and I’d have to modify to be first person, obviously credit the owner.

I’m working on a similar project, if I remember, I’ll try to get the spherical movement to work.

in what way is it useless?

I right now could likely create the system you want in around an hour, but you have not explained the specifics of what you are looking for. I do not know what limitations you are willing to accept, because you have not provided any grander description of what you need. But if you do not want my assistance then I will not force it upon you.

1 Like

It just seemed like you had no experience from the first responses, and I wasn’t trying to be rude. I just felt the questions were a bit useless because I’ve been waiting for a reply from the kenimatic system owner. I was just figuring I’d tweak his controller to my needs. If you need the full idea I had here that is:
1.changing between flying camera and first person controller when entering a planets atmosphere (using it is a baseline to tell when players are close enough, would need some smoothing like slerp? To keep the transition clean)
2. Moving around a planet surface in first person (no jaggy movements, hard corrects of the camera position, all should be smooth if possible)
3. To work for multiple planets and entities on the planet (I have a dna test code I’ve been developing for a few months I want to use to try real time planetary evolution simulating, and we want those entities to be able to walk on the surface cleanly as well (I could make a separate script where we rotate them around a axis on the planets surface and rotate them y on their local scale as well so they seem to turn and walk forward and idle, like a state machine?))
If you do need more info or what I’m willing to compromise on let me know.

First, I am experienced. I made ALME ALUCARDS LETHAL MUNITIONS EXPO | Launch. Second, all of that sounded somewhat doable for me until you said ā€œreal time planetary evolutionā€. I have no idea what that means, but if you are looking for spore style lifeforms then that sounds extremely complicated.

Ignoring that, if the planets are going to be very far apart and only one planet needs to be worried about at any given time then you can have a trigger to act as a sphere of influence, which sets a point in space for everything to aim at and move towards with a rigidbody force. The force can be determined by the trigger setting a global variable. Either that or constantly set the gravity to point at the planet, but this comes at the cost of everything always falling in the same direction.

The player and everything else would have to point at the planet position, but that can be easily achieved with a look at I believe.

I have a kinda stupid idea that might work. I made a sphere (btw do not use playcanvas spheres for planets), put an entity in the middle, made a cube that just barely gets to the top, and put a player on it. If you just rotate the entity, you get flawless planetary rotation.
https://playcanvas.com/editor/scene/2124800
I couldn’t get it to move where the player looked and Im working on jumping.

I think I have a few ideas for this like having a variable that changes when you get in a ship for planet movement.

1 Like

I have the code for real time evolution already. I was saying I may add that into this game if I do get the planet movement working.

It would be stylized so some planets in the distance, rending things like the sun since the planets will be a bit closer then normal (not a super realistic game style) and I was saying I could use a sphere for the atmosphere with collision and no rigid body as a ā€œhitboxā€ to let the script know when the player should be pulled. Aligning the play upright always is the main issue with this approach though, this comes with lag, bad movement, and the players camera usually breaks. Overall this one was difficult for me to do, but if you can I’d be happy to see your result.

This is basically what I had to this point as well, the only issue I see is that moving forward is in one direction and not forward relative to the players view (eg. you do not move forward the way the camera is facing, rather forward is a set direction.) Is there a simple way to fix this? (I worked on a project like this with Albertos a while back and this is about where we got stuck.)

I think you can get the rotation of the camera and somehow set the rotation of the whole contraption to it. Then all you have to do is rotate local. I will have to do some teasing later.

I’m sorry if this is vague as heck, if I can help let me know.

1 Like

You’re fine don’t worry. I have some free time today to work on jumping at least just upwards no matter where the player is. The rotating with camera might be hard because I think it’ll deal with vectors… maybe we can work together on it later and see what we can think of. I appreciate your help!

No problem. If you want I can add you to the project. I am decent with vectors, I just have to find a time to get on today lol.

1 Like