shooting wrong direction

Blitz3D Forums/Blitz3D Beginners Area/shooting wrong direction

Rook Zimbabwe(Posted 2004) [#1]
I would like to say that FIRST Ross C, Ross, and eBusiness have been a fantastic help. Neuromancer and Wolron as well!!! Muchos Kudos to all...

I have integrated Ross C's aroow fire routine into my game... But there is a slight problem. The arrows fire true... but they fire directly down. not out!
So I am a bit confused... the only thing I can think of is that somehow I am reading this wrong. Z should be OUT right??? Y is up/down and X is left/right???


eBusiness(Posted 2004) [#2]
Thanks, it's nice to know that my effort in helping people works (at least some of it does). About your problem, when you load the gun entity you point it at the ground, afterwards you don't touch it, I guess it should move around and rotate with the camera.

Oh, and one more thing, the gravity, for true gravity, you need a speed variable that you increase by a certain amount every loop, then if the player hit the floor, reset the variable to 0.


Ross C(Posted 2004) [#3]
I've viewed the model. It is actually upside down in the modelling program ;)

If your rotating something so it's facing the right way, use RotateMesh. This will move all the vertices in the model. Then use RotateEntity to turn it when needed :)

First thing is to check to see if the bolt is rotated the correct way also.

What i think is happening is this. You load in the gun, then rotate it. You load in the bolt. Now, because there parented, the bolt will rotate also, cause it's Z axis to be facing down. That's probably why it's shooting downwards.

If you do:

Global gun=LoadAnimMesh("textures\xbow1.b3d",camera)
ScaleEntity gun,.8,.8,.8
RotateMesh gun,90,0,180 ; USED ROTATE MESH INSTEAD <<
PositionEntity gun,-.25,-4,7


It should work fine. Children take on their parents attributes i'm sure, that's why you bolts are being fired downwards ;)


Rook Zimbabwe(Posted 2004) [#4]
You are right... I loaded it in to milkshape and the gun was facing DOWN from the mesh plane that Milkshape has... I reoriented it and all works well... rotatemesh... that is a new one one me... I am gonna spend a week just reading the command lists I suppose.

Wish there was a book.

Thanks for pointing out my silliness!

-RZ