AngularVelocity Pitch does not function, causes stuttering and locking

Describe the bug:

Use SetAngularVelocity, include any value for Pitch. Once it reaches 90 degrees, the entity won’t rotate any further on that axis and starts stuttering/locking up.

If you set it in the editor to something like (0,-180,-180) , it’ll convert into (180,0,0) (probably for maths reasons that I don’t understand), and then you quickly get the above issue.

So using Pitch at all causes stuttering/locking up. If you use negative values for the yaw and/or

When using SetAngularVelocity, If you set any part of the rotation to negative, the entity will stutter hopelessly.

Screenshots / video of bug:

Your Crayta username: ephemerald

Game seen in (including “Hub” or “Editor for XYZ”): editor for every game

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): 100% of the time angularvelocity is used

Hi Ephemerald, Can you provide an example LUA script that you’re using to get this to happen?

Oops, meant to include that in the video.

This is the script I used for it. Effects were the same on Init vs OnTick, and using properties versus just hardcoding the numbers except when hardcoding I don’t think it does the conversion from like (0, -180, -180) to (180, 0, 0).

local AngularVeloc = {}


AngularVeloc.Properties = {
{name = "Rotation", type="rotation"}
	
}

function AngularVeloc:Init()
self:GetEntity():SetAngularVelocity(self.properties.Rotation)
end



return AngularVeloc

Thanks, will have a look into this.

1 Like