Ok guys so what math would i need to learn. Also would I need to learn the physcis engine. I am willing to learn all of it but I dont know what to learn. So help em out guys slight_smile
Just figure out how to negate gravity. Gravity is an accelerating force and you’ll have to negate the force and thus allowing you vertical movement. The horizontal movement is not hard to do.
I’m confused on how broad this question is and it is almost inappropriate for the category… somehow?
Honestly this question is really cool, I myself don’t know much about manipulating physics, and resources and topics that go over the roblox physics engine are kind of rare, because it is indeed a tough thing.
All though never give up searching! There is always something out there that could help. And don’t limit your searching to DevForum articles or youtube videos, you can get out of roblox and google stuff and maybe visit other platforms and engines.
Here is a headstart, you may wanna learn about yaw, roll and pitch because they take part in plane physics math. They are used to describe rotation/angles in 3D.
Like @anon81993163 said, this is pretty broad and vague… The absolutely perfect with no issues engine is taking away all the hard-work on your end, Eulers angles are a must. There’s no need to learn the engine either right?. Again this is very vague and almost inappropriate for this category.
Also you shouldn’t expect us to baby feed what maths you need to learn, a simple few clicks and reading on google can literally explain it for you.
Edit: you may want to learn some Vectors too.
If you want to make the gravity backwards can’t you just turn the camera around?
Manipulating the camera doesn’t mean the gravity changes. First, you must understand the concept of gravity, which is a force that attracts something together (in this case, downwards). If you flip the camera upside down, you’re just looking at the screen using different point of view, gravity stays there.
Logically if the gravity is 0, you’ll float, and if it’s a negative value it’s probably pulling on the opposite direction.
Well then go tell the guy who told me to put it in this category cause a mod told me to put it here
Ok I know vectors like is that what most of physcis are based on
Also Why dont you just tell me some math I need to learn like I cant just learn random stuff
I mean Im looking to create planes is there certain physcis I need to learn for it?
I’m not going to start an unwanted long and cluttered thread which could also break the rules but I’ll say it one last time. Do not just expect people to throw maths at you, google is a resource which you can use any time and it is right at your doorstep. Go out there and do research by yourself, there are also resources such as Wikipedia which can help too.
no, it can simulate a negative gravity effect
Uh, no? Gravity will be backwards in your perspective, but not for the world. It’s the same as turning your head upside down. Sure, everything will fall upwards now, but only for you. It is still the same relative to the ground.
Also, that doesn’t solve lift in any way. It’s not like reversing a plane suddenly makes it fly. Unless you are ready to spin the entire map, which is the worst solution to this problem, not to mention that replication won’t work and the server will eventually reach a high float error height.
The reason we cannot answer your question fully is that we have no idea what you want to achieve. Realistic planes are not too hard to make but require a completely different approach from arcade ones.
For semi-realistic simulations, real life airplanes only have 3 main forces: gravity, thrust and drag. Lift is just the result of drag, but we will still assume that it’s a 4th main force to make it simpler. There are also angular forces, but including them would be a mess.
- Thrust always propels your aircraft forwards, so nothing too complicated here.
- Drag depends on forward direction and velocity, and is always in the opposite direction of the velocity, with front being the least affected and vertical axis and back the most. This will make your plane naturally realign itself to face forwards during a stall.
- Lift’s value is almost inversely proportional to drag and its direction is always vertical. When facing forwards, your plane has the highest lift, while the back has a negative lift.
- Gravity is already calculated by default.
These are the basics on the forces that affect a plane. The controls are something you will have to figure out on your own.
I can’t say much about arcade physics as they depend from game to game. GTA V has a fairly “realistic” system, but it is still arcade as gravity barely even affects the planes when moving horizontally. Others literally just keep the velocity as a constantly increasing value.
Back to the maths. To check what multiplier we have to apply for drag and lift, we first need to check whether the plane is moving in the positive or negative local direction for each axis.
local dircfx,dircfy,dircfz = cframe.RightVector,cframe.UpVector,cframe.LookVector
local dirvel = (cf-cf.p)*velocity
local dirvelx,dirvely,dirvelz = dirvel.RightVector,dirvelUpVector,dirvel.LookVector
local dotx,doty,dotz = dirvelx:Dot(dircfx),dirvely:Dot(dircfy),dirvelz:Dot(dircfz)
This is just something I found in an old script. IDK if it is correct (might have to negate LookVector), but it serves its purpose.
The basic idea is to check if the plane’s velocity is positive or negative on each axis, which dotx, doty and dotz represent. If dotz is positive, then the plane is moving forwards, otherwise it’s not moving or is moving backwards. This is the only important axis for lift, while drag has constant multipliers for each direction.
This topic is too broad to ever receive a straight and meaningful answer. Please refine what you’re asking for help with, and follow the guidelines given in the pinned About topic in this category.
You may want to try searching the forum or Google for this topic first, so you have something to start thinking from.