Пример #1
0
Файл: ai.py Проект: tazjel/bravo
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))
Пример #2
0
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))
Пример #3
0
 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])
Пример #4
0
 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])