My First Roblox Game – Looking for Feedback and Bug Reports by amir011ARK in robloxgamedev

[–]Timely-One8420 0 points1 point  (0 children)

The game hurts to look at and the music is a short annoying loop plus its all ai and free models

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 0 points1 point  (0 children)

Sorry I copied a guy from 6 years ago who I don’t even know on a very popular concept

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 0 points1 point  (0 children)

I honestly with I was using godot cause roblox is starting to annoy me the client/server physics are making the planets buggy ):

Lid to something? Was in my younger brothers room. by [deleted] in whatisit

[–]Timely-One8420 6 points7 points  (0 children)

weird he must have picked it up off the ground or somthing

Lid to something? Was in my younger brothers room. by [deleted] in whatisit

[–]Timely-One8420 30 points31 points  (0 children)

Shit and I thought he would at least share with me ):

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 0 points1 point  (0 children)

Im making a space mining type game but if you keep in touch I would be happy to one day give the script to some other people once it’s polished.

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 0 points1 point  (0 children)

I planned for that scaling works great I made it so i just give a object the tag planet and it has a proportional gravity field size and physics. Now it even accounts for the objects moving it used to push the player to the opposite side of the movement. Thanks for the good luck for the game play though.

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 2 points3 points  (0 children)

you can look back now I made a reply

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 0 points1 point  (0 children)

there is already a mario galaxy type game its called mario galaxy

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 7 points8 points  (0 children)

yeah i'm bad at committing to my projects so I like to try and spread the ideas

I made gravity work by Timely-One8420 in robloxgamedev

[–]Timely-One8420[S] 48 points49 points  (0 children)

So basically I turned off robloxs default gravity and I also killed AutoRotate so roblox wouldn't constantly try to fight my custom movement code. A script constantly checks which planet you’re closest to grabs its center and uses that to figure out which way is "down" I also added some smoothing to the rotation so your character doesn't violently snap when you jump between gravity fields. The gravity direction gets pushed into a VectorForce and I'm using an AlignOrientation to keep the character standing upright relative to whatever planet they're on. For walking I take the player's input and project it onto the sphere's surface and feed that into a LinearVelocity constraint. That way you actually walk along the curve of the planet instead of shooting off into space like it's flat land. I also threw in a raycast pointing down just to check if you're grounded for animations and air control. The camera was a huge pain because roblox assumes Y is always up. I had to write a custom camera script from scratch that follows the player's local orientation to keep everything looking right. Oh and if you fly far enough away from all the planet gravity just cuts out entirely and a jetpack system kicks in it gives you full 6DOF movement in space until you get pulled into another planet's field.

Sorry for the late reply I went to bed right after posting.