3
$\begingroup$

I have empty1, the empty that fires the bullet(s), and empty2, the empty that is always at the center of the screen. If you are confused about empty2's function, look at this question. On command, I need a line, which is our bullet, to be added. I obviously can't just add a line that starts at empty1 and is endless as that causes many issues. When the command to shoot a bullet is sent, I need a line to be created, starting from empty1, and I need to it to continue towards empty2. In other words, I need a line to be between two objects (for my case, empties). What is the best way to achieve this? Thanks!

EDIT: I prefer that the "line" is an object as I'll be planning to change its color, thickness, etc.

$\endgroup$
  • $\begingroup$ see if this what you need blender.stackexchange.com/questions/28535/… $\endgroup$ – Chebhou May 5 '15 at 23:31
  • $\begingroup$ @Chebhou I already looked at that earlier, thanks though. This question is quite different, not so much though. $\endgroup$ – blackhole May 5 '15 at 23:33
  • $\begingroup$ you need a line straight from one point to another ? you can use render.drawline() $\endgroup$ – Chebhou May 5 '15 at 23:35
  • $\begingroup$ @Chebhou Problem is, I don't know how to use python. I am planning to, but since I've made it so far in this and the remaining parts don't need much python, I've planned to learn later. $\endgroup$ – blackhole May 5 '15 at 23:36
  • $\begingroup$ OK it's your call $\endgroup$ – Chebhou May 5 '15 at 23:37
1
$\begingroup$

I added these to clarify what I do

enter image description here You could select one empty, then press ShiftS --> Cursor to selected! enter image description here

Add a curve (since you can modify it's thickness), press Tab to enter 'edit mode', select one vertex, press ShiftS --> Selection to cursor. Press Tab to exit 'edit mode' enter image description here

Select the other empty, ShiftS --> Cursor to selected. Then select the curve, press Tab to enter 'edit mode' enter image description here select the other vertex, press ShiftS --> selection to cursor enter image description here

result: enter image description here

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ And does the line show in-game? Does the line always change position when the empties are changing? $\endgroup$ – blackhole May 16 '15 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.