Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there any difference in the way the physics engine handles Motor6Ds and Welds?

Basically what I'm asking is does roblox's physics engine handle motor6d's differently than it handles welds? As in is there any difference in rendering or performance? I'm asking this because I'm animating a gun and I want to know whether it would be a better idea to use Motor6Ds over welds because the script updates the C0 and C1 properties of the weld every 1/60th of a second.

I just need to know the primary differences and similarities and the effects both have on performance and rendering, thanks.

4 comments

0

Can't answer for sure, but I've often heard from other developers that Motor6D's are fastest joints. I haven't researched my self, so I can't answer why it's so.

0

Yes there is a difference.. One major difference is the animation Editor can work on Motor6Ds, which means less coding, and possibly a reduction of margin of error for it. http://wiki.roblox.com/index.php?title=Animations#Playing_Animation_in_Non-Player_Character

0

Benchmark it ;)

0

To be clear, since Motor6Ds and Welds share the same set of properties and methods (sans the Angles stuff for Motor6Ds), it shouldn't be too hard to switch between the two on the fly.

1 answer

Motor6Ds should be handled with C
Should.

Hopefully, Motor6Ds should be handled in the physics step using C. That makes them not only more reliable if used properly, but generally faster and less likely to steal execution time between scheduler heartbeats.

4 comments

0

Are regular welds not handled with C?

1

They are, but the transition isn't. Motor6Ds are motors - They're designed to move/rotate along their joint. Welds aren't, and therefore manual weld manipulation is less efficient because it delegates to Lua.

0

I agree, but from what the OP said, it looks like they intend to adjust the C0 and C1 manually for each frame (i.e.not using DesiredAngle, etc.), so it wouldn't help.

0

I'd assume that the thought of using a Motor6D would infer that the job of adjusting the C1/C0 manually would be deprecated by the introduction of DesiredAngle

This discussion is preserved as it was. New answers, comments, and votes are closed.