what game engine does have blast processing, to get the fastest action?
now, BLENDER DOES
Well i couldn’t find a better name for this xD, is basically a ray-based collision prediction system that allows you to go at ridiculous speeds (tested at 850km/h) without even worrying about walls or floors, it just stops in the instant. so you can now kick that 40m/s limit
## bad-ass highspeed collision system
## (c)2008 by Cyborg_ar, you may
## not alter or remove this copyright notice.
import GameLogic
cont = GameLogic.getCurrentController()
own = cont.getOwner()
clk = cont.getSensor("clk")
if clk.isPositive():
pos = own.position
vel = own.getLinearVelocity()
diam = 1 #the diameter of the bound
target = [pos[0]+vel[0]/20*diam, pos[1]+vel[1]/20*diam, pos[2]+vel[2]/20*diam]
if own.rayCastTo(target,0,"") and not own.rayCastTo(target,0,"ghost"):
own.setLinearVelocity([vel[0]/1.6,vel[1]/1.6,vel[2]/1.6])
the setup cant be simpler, just put the script in a python controller, and connect an always sensor called “clk” with pulse mode enabled
to show off this cool addon i made this blend you can download (svn 15500 and above, or 2.47)
Just start it and press the spacebar, you can look the real velocity in meters/second in the debug properties. also try the blend without the blast processing and you will see how it fails xD.
if you put ghost objects in your level, you’ll have to apply a property called “ghost” to tell the blast processor to ignore that object, you can apply the property massivelly using the super handy control-c
also, there is a variable in the script called diam, there you put the approximate diameter of the object that has the script.
Attachments
blast.blend (147 KB)