Gun Accuracy

Blitz3D Forums/Blitz3D Beginners Area/Gun Accuracy

wizzlefish(Posted 2004) [#1]
In my game, I use "CameraPick" to find the location of where my bullet will fire. I fire it at 400,300, eg. the middle of the screen. In this example, the bullet is being fired at 400,300, but for some reason, it appears below the crosshair. Any suggestions?




WolRon(Posted 2004) [#2]
Explain more. HOW do you fire it at 400,300?
Maybe post some code.


wizzlefish(Posted 2004) [#3]
        If gun=1
	If ammo >= 1
	If MouseHit(1)
		PlaySound shoot
		ammo = ammo - 1
		CameraPick(camera, 400, 300)
		p.hole = New hole
		p\entityhandle = CopyEntity(bullethole)
		p\alpha = 0.9
		p\typething = "pistol"
		PositionEntity p\entityhandle, PickedX(), PickedY(), PickedZ()
		CreateSomeParticles(PickedX(), PickedY(), PickedZ(), 100, 100, 100, 6)
	EndIf
	EndIf
	EndIf


Where "bullethole" is the sprite of the bullethole.


wizzlefish(Posted 2004) [#4]
OK, thanks. :)

I found the problem, by myself. Odd....