Code archives/3D Graphics - Misc/Level decals

This code has been declared by its author to be Public Domain code.

Download source code

Level decals by poopla
(Posted 25 years ago)
Will take a sprite, and the projectile that is leaving the decal... doesnt have to be a projectile per say but thats the general idea ;).


Untested but its pretty much what I use.
function decal( sprite, entity)

  x = CountCollisions ( entity )
      For c = 1 To x

     
        PositionEntity sprite, CollisionX#(entity,c), CollisionY#(entity,c), CollisionZ#(entity,c) 
        
        AlignToVector sprite, CollisionNX#(entity,c), CollisionNY#(entity,c), CollisionNZ#(entity,c),3
        
        TurnEntity sprite,180,0,0
        
        MoveEntity sprite,0,0,-.01

       return sprite 
      Next

end function

Comments

None.

Code Archives Forum