FPS Issues

Blitz3D Forums/Blitz3D Beginners Area/FPS Issues

W
 #1
Hey guys, my bullets are acting wierd in my program now, they hit the wall lower than the center of the screen's camerapick() would tell it to. Soo, I have tried and tried and tried again, but they just won't align with the camera correctly like they did before!!

;here's my relevant code....
Function CheckWeapon()

OriginAngle# = EntityPitch#(cam\model)

If MouseHit(1) And clip > 0
clip = clip - 1
pick = CameraPick(cam\model,MouseX(),MouseY())

If pick = enemy\model
	bloodhole = CopyEntity(b\bloodhits,bloodbullets)
	holes# = holes# + 1
	PositionEntity bloodhole,PickedX(),PickedY(),PickedZ(),True
	AlignToVector bloodhole,-PickedNX(),-PickedNY(),-PickedNZ(),3
	MoveEntity bloodhole,0,0,-.01
	enemy\health = enemy\health - 1
	EntityParent bloodhole,enemy\model
	
	PlaySound b\sound
	Animate pistol\model,3,1,shoot,.50
	
EndIf 	
	
	If  pick = level\model1 Or pick = level\model2 Or pick = level\model2 Or pick = level\model3 Or pick = level\model4
		hole = CopyEntity(b\hits,bullets)
		holes# = holes# + 1
		PositionEntity hole,PickedX(),PickedY(),PickedZ(),True
		AlignToVector hole,-PickedNX(),-PickedNY(),-PickedNZ(),1
		MoveEntity hole,.01,0,0

		PlaySound b\sound
		Animate pistol\model,3,1,shoot,.50
	EndIf 


EndIf 

If CountChildren(bullets) > 200 Then 
	FreeEntity GetChild(bullets,1)
EndIf

If clip < 0 
	clip = 0
ElseIf clip > 14
	clip = 14
EndIf 		

If shots < 0
	shots = 0
EndIf  	

;Allow Melee
If KeyHit(33)
	targ = CameraPick(cam\model,MouseX(),MouseY())
	
	If Not targ = enemy\model 
		Animate pistol\model,3,1,strike,0
		PlaySound = enemy\struck
	EndIf
		
		If targ = enemy\model And EntityDistance(user\model,enemy\model) < 2
			enemy\health = enemy\health - Rand(4,5)
			Animate pistol\model,3,1,strike,0
			PlaySound enemy\struck 		
		EndIf	
EndIf 

End Function
;==========================================================


W
 #2
Nevermind guys somehow the gravity system I had just tried out was messin with the bullet holes somehow?!?!?!?!?