Well this is it!, its horrable, it works sideways very well, but i cant push it on all directions very well... can i ask for some help??
z = EntityCollided(ThisActor, coll_objects) If z For i=1 To CountCollisions(lpEnv\model) ; Calculate bounce: ; Get the normal of the surface which the entity collided with. Nx# = CollisionNX(ThisActor%, i) Ny# = CollisionNY(ThisActor%, i) Nz# = CollisionNZ(ThisActor%, i) ;- Compute the dot product of the entity's motion vector and the normal of the surface collided with. ;VdotN# = loopStar\Vx#*Nx# + loopStar\Vy#*Ny# + loopStar\Vz#*Nz# ;- Calculate the normal force. ;NFx# = -2.0 * Nx# * VdotN# ;NFy# = -2.0 * Ny# * VdotN# ;NFz# = -2.0 * Nz# * VdotN# ;- Add the normal force to the direction vector. ;loopStar\Vx# = loopStar\Vx# + NFx# ;loopStar\Vy# = loopStar\Vy# + NFy# ;loopStar\Vz# = loopStar\Vz# + NFz# ;- Do not allow the entity to move vertically. ;AlignToVector loopStar\pivot%, -nx, -ny, -nz,3 TranslateEntity lpEnv\model,-nx,0,-nz Next ;apptitle nx# End If