Say I have an object and it is randomly located and oriented. So my start point is the loc/rot of the object. I am looking for a way to calculate a second point that is X distance away from the start point, along the direction the object is facing.
Here is kind of what I have.
# Fetch the spline that makes up this weapons path. spline = temp_ob.data.splines p1 = spline.bezier_points p2 = spline.bezier_points point_on_curve = temp_mt.matrix_world * temp_mt.location locator_point = temp_loc.matrix_world * temp_loc.location start_point = point_on_curve + locator_point p1.co = start_point <b>axis = Vector((1,0,0))</b> end_point = point_on_curve +(axis*100.0) # Length of laser..? p2.co = end_point
I think what I have could work, but I don’t know how to generate a valid axis = Vector((1,0,0))