Never ending node transform detection through ControllerOtherEvent (C++ SDK)
Not applicable
08-29-2019
02:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using the ControllerOtherEvent to detect changes related to node's transformation matrices. The steps I follow are:
- Get the matrix of the transformed node (INode::GetNodeTM)
- Perform some operations on that matrix to clamp it to a surface
- Use that resultant matrix to set the final matrix of the given node (INode::SetNodeTM)
The problem is that, applying changes to the node's matrix in step (3) will derive on the ControllerOtherEvent being called again and again, since the node's controller is modified of course. In the viewport, you'll see my node moving until it reaches the max/min of allowed coordinates.
Is there an elegant way to solve this? How can I manage to set the new node matrix without this event being called forever?
Thanks!
Link copied