raycast help
-
dafluke
- Posts: 4
- Joined: 21 Oct 2010, 04:21
raycast help
i'm trying to use a 'raycast' node to constrain an object to another object's surface. however i have no idea how to get a direction value from the global rotation value of my raycasting null. i tried reading isner's quaternion tutorial to better understand rotation math.. but i'm just really confused at this point. can anyone help me out with this? thanks!
-
Mathaeus
- Posts: 1778
- Joined: 08 Jun 2009, 19:11
- Location: Zagreb, Croatia
Re: raycast help
Hi
If i understood this correctly, you'll need to define a local direction first, let's say to type 0, 1, 0 in 3d vector node, then just rotate this vector by global rotation of null - or, mentioned 3d vector node > multiply vector by matrix (matrix is global transform of null) > subtract from global position of null.
If i understood this correctly, you'll need to define a local direction first, let's say to type 0, 1, 0 in 3d vector node, then just rotate this vector by global rotation of null - or, mentioned 3d vector node > multiply vector by matrix (matrix is global transform of null) > subtract from global position of null.
-
dafluke
- Posts: 4
- Joined: 21 Oct 2010, 04:21