resonanz Posted March 22, 2011 Share Posted March 22, 2011 Hi to everybody! I am trying to learn vex coding right know. As an reference I use the file uploaded by Petz as an answer to a question I had a while ago. I would like to emulate bouncing points with the help of VEX. I am not sure what I am doing wrong but there must be a fundamental mistake how the setup is right now. It would be nice if someone could help. Thanks in advance! bouncing_point.hipnc Quote Link to comment Share on other sites More sharing options...
symek Posted March 22, 2011 Share Posted March 22, 2011 You didn't rescale ray_dir vector again to increase intersect() distance as in a first turn. cheers, skk. ps you could also move P and N assignment out of the loop Quote Link to comment Share on other sites More sharing options...
resonanz Posted March 23, 2011 Author Share Posted March 23, 2011 Thank you Symek! You are right I forgot to rescale the vector. I also moved P an N outside the loop as you mentioned but even so it does not work. The first bounce is working but after that i get strange results and i do not understand why this happens. Thanks in advance! bouncing_point_fix.hipnc Quote Link to comment Share on other sites More sharing options...
symek Posted March 23, 2011 Share Posted March 23, 2011 Indeed, it works for 3 or 4 bounces. I'm not sure why though. Quote Link to comment Share on other sites More sharing options...
petz Posted March 23, 2011 Share Posted March 23, 2011 your problem is related to rounding issues. you need to offset the point a bit away from the intersection geo and it should work. file is attached! petz bouncing_point1.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.