Parts connected by non-rigid constraints are not part of the same assembly, so it sounds like you still have more than one assembly here:
(rigid joints refers to the Weld, ManualWeld, Snap, and Glue joints)
So things connected by Spring or Cylindrical Constraints are not the same assembly. Two parts connected by a spring can both have their own velocity, so they can’t be the same assembly.
Looping through the parts to calculate a total mass isn’t that inefficient, you should only have to do it once or whenever the collection of parts change.
This is an issue independent to Humanoids. They often change between simulated and non-simulated states. When they are in a non-simulated state, applying an impulse won’t work.
We are working on some changes that will fix this, leading to humanoids that are always simulated. Or, you can create your own character controller.
Ah ok that makes sense. In my case the masses of the assemblies attached with non-rigid joints are fixed so I can just cache that and add it to the assembly mass of the base root part to account for the changing mass of the main assembly. Nonetheless, this is a great and much anticipated update. Thank you!
What determines whether or not the player is being involved in the physics solver? Also, is there a way to set a player to a simulated or non-simulated state?
It’s determined by the HumanoidState, the RunningNoPhysics state means the humanoid is not being simulated in the solver.
Although a bit hacky, you might be able to use Humanoid.StateChanged event and Humanoid:ChangeState to keep it out of this state.
Adding a dev hub page for the impulses will make it more straight forward, though this is a great update to Roblox. I’ve been using it for a few days, and I can see how it makes builds much more flexible than the old system.
Any updates on this? I was applying this feature to my project just to realize this is an issue. Hope there’s news on this soon. This is an exciting feature nonetheless.
I have noticed that AssemblyLinearVelocity and AssemblyAngularVelocity can’t be changed on any BasePart unless said object is a descendant of workspace. Is this intentional by any chance? I have only noticed this after switching from Velocity and RotVelocity to those.
The impulse-applying functions also don’t have any effect too.
It wasn’t necessarily intentional, just that since the assembly doesn’t exist outside the workspace it wouldn’t make sense to have an assembly velocity. However I think we can change it to have the same behavior as the Velocty and RotVelocity properties for ease-of-use. The current behavior of those properties will let you set velocity on parts outside of workspace, but only the resulting root part of the assembly will take once in the workspace.
The impulse functions will only work on parts that are in the workspace.
Oh, that clears it! I was sort of confused about that, and this mostly resulted from me changing velocity-related properties in parts before I parent them to workspace.
To be honest, it’s not that much of a deal, but I guess it would be better if those properties could be changed outside of workspace.
Can someone explain to me how to use the new ApplyImpulse to fire projectiles? There’s absolutely zero documentation on any of these properties on the devhub
Anyone gotten something working? I’d like to avoid using Impulse from now on as ApplyImpulse is almost definitely better for performance but right now it’s pretty hard to figure out without any proper documentation.
Setting AssemblyLinearVelocity doesn’t work either.
I think I need more information to give you the best answer (what do you mean “not working”?), but there are some things I am noticing right away:
It looks like you have the arguments backwards for ApplyImpulseAtPosition. From the original post:
However, since it does look like you are attempting to apply it at the Projectile’s center of mass, all you need to use is ApplyImpulse.
Also, it looks like you are trying to use the same value you used for velocity, now with an impulse. These are different units, impulse is a force value, not a velocity. You probably need to use a much higher value.
I’m also questioning your BodyForce… do you have Workspace gravity set to 0?
Vector3 BasePart:GetVelocityAtPosition(Vector3 position) is now available to use!
As such, BasePart.Velocity and BasePart.RotVelocity are deprecated in favor of this function and the assembly velocity properties.