I’ve gotta be missing something. The answer is probably ridiculously easy and I’m just completely not seeing it.
Say, I’ve got the sample UE4 project that has a couple of chairs and a table and I’m utilizing the WebBrowser module. I BindUObject one of the chairs so I have access to it in javascript. On the javascript side, I want to simply rotate the chair. I have access to k2_SetActorRotation on the bound chair object, and the C++ function signature of this function is:
bool K2_SetActorRotation
{
FRotator NewRotation,
bool bTeleportPhysics
}
How the heck do I pass the Pitch, Yaw, and Roll of the FRotator in my javascript call? I’ve tried several different ways such as:
this.unreal(‘chair’, ‘k2_setactorrotation’, {pitch: 0, yaw: 180, roll: 0}, true);
and
this.unreal(‘chair’, k2_setactorrotation’, {NewRotation:{pitch: 0, yaw: 180, roll:0}, bTeleportPhysics: true});
but the rotation that comes through in UE4 is always 0,0,0. If I pass a simple value to, say, a custom function I put in the chair’s blueprint, I can get that value. But if it’s a struct (like the above FRotator) it’s always zero rotator. What is the proper syntax for passing this sort of data? Thanks in advance.