def slide_collision_vector(vector, normal): """ Returns a vector that allows an entity to slide along blocks.""" dot = dot3(vector, (-normal[0], -normal[1], -normal[2])) return (vector[0] + (normal[0] * dot), vector[1] + (normal[1] * dot), vector[2] + (normal[2] * dot))
def slide_collision_vector(vector,normal): """ Returns a vector that allows an entity to slide along blocks.""" dot = dot3(vector,(-normal[0], -normal[1], -normal[2])) return (vector[0] + (normal[0] * dot), vector[1] + (normal[1] * dot), vector[2] + (normal[2] * dot))
def calculate_slide(vector,normal): dot = dot3(vector,normal) return (vector[0] - (dot)*normal[0], vector[1] - (dot)*normal[1], vector[2] - (dot)*normal[2])