setRotation method
Directly sets the rotation for entity
to rads
around the axis {x,y,z}, skipping all collision detection.
Implementation
@override
Future setRotation(
ThermionEntity entity, double rads, double x, double y, double z) async {
var quaternion = Quaternion.axisAngle(Vector3(x, y, z), rads);
_module.ccall(
"set_rotation",
"void",
[
"void*".toJS,
"int".toJS,
"float".toJS,
"float".toJS,
"float".toJS,
"float".toJS
].toJS,
[
_sceneManager!,
entity.toJS,
quaternion.radians.toJS,
quaternion.x.toJS,
quaternion.y.toJS,
quaternion.z.toJS,
quaternion.w.toJS
].toJS,
null);
}