Yeah,
I guess most 2d games in blender make use of the x and z axis but I just use the y and z axis without any reason lol.
So would be really cool if you wanted to rotate everything in your blend along the z axis with 90 degrees and adjust the scripts to that, since I dunno how to get it right.
Also, blender’s text editor does have a search function. Ctrl+F to find it.
I used Ctrl F but line couldn’t be found.
Pretty confused now because I don’t know which blend I have to use since I cant find that line at all on line 21…
Yep. Have the force applied along the Y axis instead of the X (line 9 in fire.py). Rotate the bow/arrows 90 degrees (and apply rotation!), plus probably a few other things.
This was obviously not intended to be a plug-in for Hikojj’s game. He will have to adapt it to fit his own unique environment. Since I have no access to that, I am in the dark as to what that is.
It all went a bit strange, but first of all I want to thank you both for putting so much afford in my problem ;).
This was obviously not intended to be a plug-in for Hikojj’s game. He will have to adapt it to fit his own unique environment. Since I have no access to that, I am in the dark as to what that is.
Yep, but I think I will succeed adapting it for my game.
Increasing the force applied to the arrow will lessen its arc, but will also yield faster projectiles (which may not be what you want).
If you don’t care about being realistic, and you just want more independant control over the speed/path of your arrows, you might try applying some artificial ‘anti-gravity’ to the arrows…
put this at the end of arrowBrains.py, within the elif statement (that is, indent these lines). I tested it out on our little prototype and it seems to be working well.
G = logic.getCurrentScene().gravity
force = own.mass * G[2] #our mass times world's Z gravity
damp = 0.1 #lower this for "heaviness", increase for more "floatiness"
own.applyForce([0,0,-force*damp], False)
Adjusting ‘damp’ will let you adjust how much arc you will get. 0.0 will act as they do now under normal physics. 1.0 should make them fly straight without any arc at all.