To check for collision I tried:
collidables=[]
myroom.collidemesh()
collidables.append(myroom)
ball.collidesphere(0.25)
collidables.append(ball)
and in my move function I checked in every step:
for objects in collidables:
#Perform the collision check with the object
info = ball.collidingwith(object,1)
if info.intersected:
#Set the balls new vector to the reflection vector
#ball.vector = viz.Vector(vizmat.ReflectionVector(ball.vector,inf o.normalVector))
vY=-vY
But did not work yet?!
Last edited by Johannes; 01-10-2005 at 07:43 AM.
|