I want to have this crossbow in my game: Medieval crossbow fantasy arbalest, (.3ds) 3D Studio Max software, Military Objects , can you see some kinde of magazine full of arrows. I want every time I fire a arrow it shortens for one arrow. And also I was wonderig how to do It. Should i use blender for magazine emtying and engine graphics for arrow flying or someting else.
I would suggest to do everything in blender, it will be a lot easier.
If you want to use jME to move the arrows, then they will have to follow the animated bow(ouch). If a Child-Of Constraint existed in jME then this wouldn’t be too bad (i don’t think it does though). Otherwise you could potentially pick 2 vertices of the bow (and apply any additional transform you have applied to your bow), or maybe 2 bones? (never tried) and get the direction vector between them. Turn that into a Quaternion, which will give you the rotation to apply to the arrow to make it in the same orientation as the bow. Then do the same for translation, taking into account any other arrows you have there already
So I create every arrow as a difrent object. Lets say i have three arrow in magazine, each has same orientation as crossbow and when a button is clicked I fire the first one and set location of second arrow to the location where first arrow was before it was fired, and set location of third arrow where second arrow was??? And I wanted to ask can I create all of this in blender(I’m noob in blender), maybe you could give me a link to some good tutorial on this mater. The problem is that arrows have to fly until they colite with the enemy.
Ya. You COULD do this programmatically but you’ll lose a LOT of sleep. I’d handle this as 3 different miniature projects.
- Your quiver (arrow magazine)
- Your crossbow animation
- Bolt (arrow) flight
The first one would be a collection of perhaps 2 models (the quiver and a bolt model) that you’d attach to each other. https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset would be a good start on how to do that.
The second is pure blender animation. For that I’d say just use :google:
The third depends on how you want the bolts to fly. Is it going to fly in a straight line? Then determine the direction your crossbow is aiming and apply a vector to it until it hits something. OR is it going to be affected by physics (Wind, gravity etc)? So ya. Lots to think about.