How can I set the world coordinates on an object's transform?
Here is a simple example : an object would be sliding on the ground, its motion would be constrained to an object flying above, but its translation Y would be always 0.
Where in the docs can I find this kind of info?
Thanks
Gz
Set world transform on channel
2858 4 1- Grendizer
- Member
- 375 posts
- Joined: May 2014
- Offline
- Dan de Carvalho
- Member
- 2 posts
- Joined: March 2016
- Offline
If you're trying to access the world coordinates of an object then see this thread:
https://www.sidefx.com/forum/topic/22768/?page=1#post-255947 [www.sidefx.com]
Not sure if this helps
https://www.sidefx.com/forum/topic/22768/?page=1#post-255947 [www.sidefx.com]
Not sure if this helps
- Grendizer
- Member
- 375 posts
- Joined: May 2014
- Offline
Hello Dan
Many thanks for your help and this link.
So here's what I did:
Create a cube and a sphere , positioned the sphere at 4 above the cube.
In the cube's parameters pane > tab “transform” > added these expressions in X and Z : vtorigin(“”, “../sphere_object1”) . Check attached pic.
Now when I move the sphere in X, the cube moves, but in a weird way, it progresses on the grid along a 45° axis.
Moving the cube in Z does nothing.
There must be something missing, I should be able to access the global X and Z translation of the sphere…
Thanks
Gz
Many thanks for your help and this link.
So here's what I did:
Create a cube and a sphere , positioned the sphere at 4 above the cube.
In the cube's parameters pane > tab “transform” > added these expressions in X and Z : vtorigin(“”, “../sphere_object1”) . Check attached pic.
Now when I move the sphere in X, the cube moves, but in a weird way, it progresses on the grid along a 45° axis.
Moving the cube in Z does nothing.
There must be something missing, I should be able to access the global X and Z translation of the sphere…
Thanks
Gz
Edited by Grendizer - Aug. 12, 2018 11:22:16
Houdini gamboler
- tamte
- Member
- 8854 posts
- Joined: July 2007
- Offline
Grendizervtorigin() returns vector, and since you are not specifying which component to use, both of your parameters use first, so both are controlled by sphere's global X position
In the cube's parameters pane > tab “transform” > added these expressions in X and Z : vtorigin(“”, “../sphere_object1”) . Check attached pic.
so you want to specify components for X and Z respectively like this:
vtorigin("", "../sphere_object1")[0] vtorigin("", "../sphere_object1")[2]
but you can as well just create Blend Constraint and uncheck TY
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Grendizer
- Member
- 375 posts
- Joined: May 2014
- Offline
-
- Quick Links