Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

What is the best way to go about learrning Roblox physics?

Asked by
tumadrina 179
2 years ago

For example, I would like to learn to make a curved trajectory path for a projectile that can detect objects in its way, or attacks that move in fancy ways. I already know pretty basic physics and trigonometry, but I'm just lost on how I would go about implementing it on Roblox. I feel very comfortable with Lua, but I struggle with scripting things that involve more complex movements in Roblox. I'm never exactly sure when I should use CFrame or BodyObjects or maybe even something else? If I could be pointed in the right direction on what to study, I would greatly appreciate it. Also, if you have any resource recommendations that would help me learn, I would really like that as well. Thank you!

2
Experimentation, figuring out which works best for each situation, trial and error, bla bla bla. It takes a while to get used to something but the best you can do is research, trial and error, and above all: perseverance. gl <3 Antelear 185 — 2y
0
goddess imKirda 4491 — 2y

1 answer

Log in to vote
3
Answered by
Xapelize 2658 Moderation Voter Community Moderator
2 years ago
Edited 2 years ago

There's a lot of way to make custom physics engine, solutions too, but an approach for a physics engine can be complicated.


Aside from the bad english, here's some tip for your attempt, to make a custom physics engine, you will need to involve simulating force and detecting collisions using regions on every rendering stepped frame, applying velocity and making attenuation for the force, you would need a lot of code and math for that!

Projectiles are also something that isn't easy and you also need them in your custom physics engine (maybe), here's an reference image that I drew with my mouse, I'm bad at explaining so here's a wikipedia page for projectiles that might help

I don't know much math for the things, but if you check out the open-sourced slingshot in the toolbox that is made by Roblox, there is a projectile script that calculates the force and apply it to the velocity, it's not an entire custom physics engine but it's something that can help though

Also consider checking out Bézier curve (I don't know if it does anything for the custom physics but you should check it out)


The big text above are a better solution for your question, although you can check out CustomPhysicsProperty, there is a lot of settings that you can toggle or change for the physics on that one brick

bye :wave:

Ad

Answer this question