here is that code
local z,x,c = HYP_PhysX.GetActorLinearVelocity(body)Runs in every frame.
HYP_PhysX.SetActorLinearVelocity(body, z, 0, c)
z,x,c = HYP_PhysX.GetActorGlobalPosition(body)
HYP_PhysX.SetActorGlobalPosition(body, z, 0, c)
z,x,c = HYP_PhysX.GetActorAngularVelocity(body)
HYP_PhysX.SetActorAngularVelocity(body, 0.0, x, 0.0)
When objects colide there is slight change in actor`s direction vector, it is no longer in game plane.
But what if there is function `HYP_PhysX.GetActorGlobalOrientation( )` then we could do this
local angle, x, y, z = HYP_PhysX.GetActorGlobalOrientation(body)And then it can be done in every couple of seconds, not in every frame.
HYP_PhysX.SetActorGlobalOrientation(body, angle, x, y, z)
I tried with `HYP_Object.GetDirection` to retrieve current direction vector of body and failed.