Skip to content

Commit 514501f

Browse files
author
Roberto De Ioris
committed
added rotation() method to FVector
1 parent 3abac61 commit 514501f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/UnrealEnginePython/Private/Wrappers/UEPyFVector.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ static PyObject *py_ue_fvector_normalized(ue_PyFVector *self, PyObject * args) {
1414
return py_ue_new_fvector(vec);
1515
}
1616

17+
static PyObject *py_ue_fvector_rotation(ue_PyFVector *self, PyObject * args) {
18+
FRotator rot = self->vec.Rotation();
19+
return py_ue_new_frotator(rot);
20+
}
21+
1722
static PyObject *py_ue_fvector_dot(ue_PyFVector *self, PyObject * args) {
1823
PyObject *py_obj;
1924
if (!PyArg_ParseTuple(args, "O:dot", &py_obj))
@@ -62,6 +67,7 @@ static PyMethodDef ue_PyFVector_methods[] = {
6267
{ "size_squared", (PyCFunction)py_ue_fvector_length_squared, METH_VARARGS, "" },
6368
{ "length_squared", (PyCFunction)py_ue_fvector_length_squared, METH_VARARGS, "" },
6469
{ "normalized", (PyCFunction)py_ue_fvector_normalized, METH_VARARGS, "" },
70+
{ "rotation", (PyCFunction)py_ue_fvector_rotation, METH_VARARGS, "" },
6571
{ "dot", (PyCFunction)py_ue_fvector_dot, METH_VARARGS, "" },
6672
{ "cross", (PyCFunction)py_ue_fvector_cross, METH_VARARGS, "" },
6773
{ "project_on_to", (PyCFunction)py_ue_fvector_project_on_to, METH_VARARGS, "" },

0 commit comments

Comments
 (0)