How do i stop a model from tilting?

I made a custom humanoid-less NPC that uses bodyvelocity and bodygyro to direct its movement, but it seems when it runs into something or a force is pushed against it, it will sometimes fall down and then start floating in random places.

I was wondering if there was a way to completely nullify the ability to push or tilt the model by physical means? I cant anchor it because it will mess up the velocity and gyro, and i changed the custom physical properties and it helped a little but not completely. I tried making a large base under the npc and welding it to it, which did not help either. I also ended up making the humanoidrootpart larger to act as a HipHeight, so im not sure if thats a problem either.

Is there a simpler option to avoid all of this? Thanks

2 Likes

I’m not all to sure of how your custom model works but normal rigs have a HumanoidRootPart that’s anchored and only that moves eveything just follows it, altought i’m not sure how bodyvelocity works on anchored part if it even does

1 Like

My rig is juet the regular r15 model without the humanoid. Made humnaoidrootpart CanCollide and the rest of the parts arent. Nothings anchored either. The movement system works great until they accidentally fall over

Why humanoid-less though? If you include a humanoid it would be much easier.

The point of it is to create large quantities of npcs with less stress to the memory. I want to improve the performance of them, since humanoids are known to cause performance issues

1 Like

Bump, still looking for a solution!

1 Like

Bump, still looking for a solution! x2

I’m not sure if bumping is allowed. but I do have a solution for you: Align Orientation. When using an Align Orientation you are able to make an unanchored object attempt to maintain a desired orientation which is perfect for your situation.

To set it up you want to start out by putting an Align Orientation into the NPC’s humanoid Root part (or really any part that is welded to the rest).

image

Once you do that you want to make sure that the part that you put your Align Orientation into has an attachment, if it doesn’t then add an attachment to that part.

image

Now click on your AlignOrientation and make sure that the Mode property is set to OneAttachment and that MaxTorque is set to inf (or just a really big number) and Responsiveness is set to 200. Then finally set Attachment0 to RootRigAttachment.

Now if you press play your NPC will no longer tilt over, rather it will always stay completely parallel with the ground.

It is to be noted that if you want to change the direction the npc is facing you hve to edit the CFrame property in the Align Orientation to get the desired effect.

3 Likes

No i mean that the HumanoidRootPart is anchored, and that’s all that moves, everything else follows it since it’s the center of the rig

1 Like