So I’ve been learning about roblox physics and I don’t understand this, many advanced scripters who create things like jets and what not don’t actually use physics constraints. Instead they just do things such as CFrame lerping and what not and they do this in like huge loops. Isn’t this more performant on resources rather than using roblox physics instead? And it seems much more complex, I know roblox physics is bad. But it can’t be that bad to the point where you are choosing to constantly lerp a CFrame in some sort of huge loop to move it instead of using a velocity constraint for example.
Physics calculations can be resource-intensive, especially for complex interactions involving many parts or changing environments. Often times using CFraming allows for direct controlling of the object, achieving smoother and more efficient movement.
There’s a time and place for both methods, it ultimately depends on your needs.
Is it really that resource-intensive though? I know roblox physics isn’t great but like as I said, to the point where people choose to lerp a CFrame instead of using a velocity constraint?? + Looping?!
Again, really depends on the game itself, how many moving parts they have, etc. From my personal experience, setting the CFrame allowed for more control over the vehicle, etc.
I would play around with either method to see what fits your needs.
I sort of struggle to understand how it would vary from each game? Could you elaborate with some more examples or more explanation please?
Roblox Physics: This can include things like collisions, forces, and joint constraints. While this can be convenient for simpler interactions and when you want to rely on the physics engine to handle things like collisions automatically, it can become resource-intensive for complex interactions or large numbers of objects.
CFrame Lerping: On the other hand, manually interpolating between two positions or orientations over time gives you direct control over the movement of an object without relying on the physics engine. While this method can be more performant in some cases, especially for vehicles or aircraft where precise control is necessary, it can also be a bit tricky to implement, as you need to program the movements yourself.
I would consider my needs first: What kind of vehicle is it? Is it a basic car? Is it a space ship? What planes am I operating on? (X/Y/Z), etc. If I’m making a simple car, I might not need to precisely handle the movement of it and can rely on Roblox constraints. But if I’m making a spaceship that can move up and down each axis, I might want more precise control over it’s CFraming.
Yeah I’m talking about advanced things, so I assume CFrames are the way to go? I guess yeah. I mark you as the soltuion.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.