Re: Bullet script

Cool!

Re: Bullet script

You might have better result by using a ray-test :
http://wiki.maratis3d.org/index.php?title=RayHit

A bullet is very small so it can miss the collision test I think.

Re: Bullet script

Thank you, this is exactly what I was looking for. smile

Re: Bullet script

http://www.mediafire.com/?ae969pctg5v04za Am I using the script correctly? I have put it just under the fire-section.

Re: Bullet script

And what does the co-ordinates mean with {100, 0, 0} in end1? Is it that it stops after it has reached 100 steps in the X-axis?

function onSceneUpdate()
       start = {0, 0, 0}
       end1 = {100, 0, 0}
       point = rayHit(start, end, object)
       if point then
           print(point)
       end
   end

The way I see it is that you use "object" to see if it hits something within the range of start and end1, is this correct? And if so it prints out point in the Maratis-console.

Last edited by Pär (2013-01-04 13:05:30)