Viewpoint Forums
Viewpoint Forums
Viewpoint Modeling
Translation of an object only on XZ Plane|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Junior Member |
Hi @all !
I want to drag and translate an object only on XZ plane. I've searched allready in viewpoint code reference but i found nothing. Please can anybody help me to realize this? greetings, ramius |
||
|
|
Member |
There may be an easier way to do this, but this is what I suggest off the top of my head:
1) create an interactor that handles the drag of your object: <MTSInteractor Name="move_myObj"> <Target Name="myObj"/> <MTSHandle Event="MouseDrag" Action="MTSDrag" Target="myObj"/> <MTSHandle Event="MouseDrag" Action="dragObj"/> </MTSInteractor> 2) use vetscript to restrict the movement along the Y plane: <MTSAction Name="dragObj" Type="VETScript"> <!-- coords = MTSInstance[myObj].loc_; coords.y = 0; MTSInstance[myObj].loc_ = coords; --> </MTSAction> |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
Viewpoint Modeling
Translation of an object only on XZ Plane
