How would you make a bullet hole appear on an object. I have code that creates a bullet that disappears when it hits an object or the terrain, but I want to create a bullet hole texture on the location it hits.
Bullet Holes
Blitz3D Forums/Blitz3D Beginners Area/Bullet Holes Well, you could splat the target texture or you could just have a bullet hole mesh that you affix to the mesh you just shot.
What do you mean splat the texture?
I tried creating a sphere at the point where the bullet collides with an object but nothing happens. I even tried slowing down the bullet.
heres some code that uses the align to vector example but uses sprites.
Function updatebul() For c.char= Each char For e.enemy= Each enemy For b.bullet= Each bullet MoveEntity b\e,0,0,4 If EntityCollided( b\e,enem ) ;if it collides with an e\hp=e\hp-Rnd(10) ;enemy delete the bullet x20=x20+1 ;and make it lose health End If If EntityCollided(b\e,worldC) ;if it hits a world object h.sprite=New sprite ;create a sprite at the h\e=CopyEntity(holesp) ;coordanates picked by a h\x=p_x ;pick cammand h\y=p_y h\z=p_z AlignToVector h\e,-PickedNX(),-PickedNY(),-PickedN(),3 PositionEntity h\e,h\x,h\y,h\z SpriteViewMode h\e,2 ;makes it not face camera FreeEntity b\e Delete b Else If b\z>100 ;if the bullet goes to far delete the Delete b ;bullet FreeEntity b\e End If Next Next Next End Function
Thanks!
your welcome