Lumberyard Bugs and Suggestions

Hello Lumberyard Devs,

I’ve been working with Lumberyard for the past couple of weeks. In this time, I’ve been able to create a prototype for a character which can move, rotate, and has basic locomotion animations. It’s taken time but I was able to get very far in the past few days.

In this time, I have hit a number of bugs in the engine that the Lumberyard team should be aware of. Rather than create a separate thread for each bug I ran into, I just decided to keep a running list of the bugs I’ve encountered and make one thread which covers them all. I also have a few suggestions for the LY team for pain areas I’ve encountered along the way,

Edit** I forgot to add that in all cases I’m using Lua for game scripting.

Bug #1 Quaternions
There is a bug in LY when using Quaternions. I’ve seen this bug pop up every time if I try to use Quaternions for rotation. Rotation seems to work fine initially but after a few rotations the object scale intermittently increases and decreases. I was pulling my hair out trying to figure out why it kept happening and I eventually realized that it’s because I was using Quaternion.

The only reliable way to rotate an object without side effects is to use Transform.CreateRotation(). The scale issue needs to be addressed before quats can be used reliably for rotating objects. Quaternions also randomly return nil values.

Bug #2 Transform.GetBasisAndPosition
For objects, Transform.GetBasisAndPosition only returns the initial values the object has. It doesnt get updated at runtime. Transform.GetTranslation works fine for getting position. Getting an object’s rotation requires using either Transform.GetColumn or MathUtils.ConvertTransformToEulerRadians(transform). Transform.GetColumn is overly complex especially for folks who don’t understand linear algebra and matrix transformations. MathUtils.ConvertTransformToEulerRadions method seems to work fine and really should be added to the Transform class.

Bug #3 Visarea
Visarea doesn’t occlude objects. According to the documentation, objects in a visarea should be hidden unless the camera is also inside it and portals should be used to connect two visareas. However, portals seem to do what visarea is supposed to do, and visareas don’t seem to occlude objects at all. However, occluder area objects do seem to work as expected and can be used to effectively cull scene objects.

Bug#4 Key onreleased event
Key onreleased events are always called twice. Set a Debug.Log and you’ll see this event gets fired multiple times.

In most cases, this is a fairly benign bug but it causes a problem when a button is used as a toggle. If a button onreleased event calls a function which toggles a state, when the event is called twice it causes the function to be called twice flipping the state twice. The only way to use a key onreleased event as a toggle is to hack around this bug by setting a variable state in the onheld event and then only process the state toggle if this variable has been set. In this case, clear the variable set by the onheld event and the next time the onreleased event is called this variable has been cleared indicating this is the duplicate event call.

Bug #5 Animation Editor touchy
The Animation editor stops working randomly. It doesn’t crash but things simply stop working randomly. It seems like the engine sometimes expects things to be done in a certain order otherwise it just sits there not doing anything. Sometimes when I click nodes, the details don’t show up. I have to click something else and click it again for the details to show up. I know this information isn’t very useful but it’s the best feedback I can give. In short, the Animation Editor could use some thorough usability testing.

Bug #6 Blend Space editor unstable
In the blend space editor, I experienced a bug where updating the positions of existing points caused the animation editor to become non-responsive. This goes back to the previous bug; general instability of the Animation Editor. I mentioned this one specifically because I remember exactly what action I performed that caused the bug.

Bug #7 Blend Space point changes don’t trigger a save.
This was a very annoying bug that took me awhile to figure out it was happening. In short, most changes to any values in an animation workspace trigger a save, except for updating points in a blend space. If you open a blend space, modify an existing point, and try to save, the change doesn’t get saved. After my change wasn’t saved several times, I realized I needed to do something else, ie. move a node around, change a value and change it back etc. in order to trigger the save to the animgraph. Once a save is triggered, the update to the blend space point would then get saved.

Bug #8 EFX workspace update wants to save to a new file
Saving to motionset and animgraph files work fine, but there’s a strange bug where when you click “Save all” the animation editor doesn’t recognize it’s already working in an existing workspace and always forces you to choose a file to save to. When I choose the currently open, existing workspace file, it prompts me that this file already exists and am I sure I want to save over it. Ummm… yes actually I do want to save over it.

Bug #9 No AnimGraphComponentRequestBus.Event.SetNamedParameterInteger() function.
I was going to use an Integer Animation Parameter type until I realized there’s no way to set it in Lua. There’s only a SetNamedParameterFloat() function so I was forced to use a float for the parameter. Please add .SetNamedParameterInteger() function so I can use and set Integer values for animation parameters.

Ok that’s it as far as bugs go. I mentioned that I would also supply some suggestions for pain points I encountered. Aside from bugs, the main pain point I’ve encountered is the lack of documentation for engine classes(not Ebus methods, general engine objects). Why is there no documentation for these classes? I understand there are alot of classes here but we really need something which provides at least the most topical information on these classes. This doesn’t need to exist in the Lua editor but should be added somewhere in the site documentation. This engine isn’t really fully documented until these classes have documentation as well.

The Lua class and Ebus function parameter description is very vague and confusing at times. I was able to figure out that the return type is listed first in brackets in the function parameters but this is very confusing. I’ve never seen function return types documented in such a way. This may be due to the fact that I haven’t done much in Lua but it’s confusing nonetheless.

Some object methods and ebus methods return specific object types. This is straightforward, however, in some cases the return type is described as […]. I have no idea what this is supposed to be but I assume it’s a custom table which the autogenerated function signature documentation generated. Understandable, but saying a function returns […] is completely useless. I’ve had to avoid using functions with this return type simply because I couldn’t figure out what the hell it’s supposed to return. There’s gotta be a better way.

In the method descriptions, there are also often times where I simply couldn’t figure out what a parameter is supposed to do. Most of the time, the name of the function indicates the meaning of the parameter list but sometimes it’s not apparent. For example, for the Vector2 Class there’s a method listed as follows:

IsNormalized([=bool] Vector2, float)

This indicates that this function takes a Vector2 as its first input and returns a boolean but what the heck is the purpose of the second float parameter? I don’t know. Does anyone know?

Also, while on the topic, I can surmise from this function signature that this function takes the vector to be considered for being normalized as it’s parameter and is therefore intended to be used as a static function of the Vector2 class rather than an instance function. Other methods are intended to be used as instance methods. Again this is something only more advanced developers will pick up on. No novice coder would ever be able to figure that out. This should be explicitly explained somewhere. In fact, how to read and interpret the function reference in the Lua editor warrants a section of it’s own on the documentation site.

Lastly, I’ve noticed in the Class Reference in some cases a function parameter list ends with “…”. This almost completely invalidates the purpose of documenting the function parameters. Again, this is another type of function that I’ve had to simply avoid using due to lack of knowing what the hell the function requires. The engine will throw a script error if you don’t get the function parameters right, and the Class Reference refuses to tell you what the function parameters are so you just have to hope another function does the same thing. Again, there’s gotta be a better way.

Wow this was a long post. Hopefully someone finds this helpful.