Issue 6006
object.WorldTransform() only works in main.py and not in modules
When trying to run:
box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
box_wt = box.WorldTransform()
bt=box_wt.T()
All works well.
I can use a function for this as well in main.py:
def model_get_T_world(model):
wt=model.WorldTransform()
t_=wt.T()
return t_
box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
bt=model_get_T_world(box)
All works well.
But if I try move the model_get_T_world function to an extension/module like:
import FUNC #Contain model_get_T_world
box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
bt=FUNC.model_get_T_world(box)
The T vector get the wrong values.
Submitted byThe-any-Key
May 25, 2019