3

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.

blackhole
  • 2,390
  • 4
  • 26
  • 64
  • see if this what you need http://blender.stackexchange.com/questions/28535/how-can-i-make-a-bullet-tracer-in-bge – Chebhou May 05 '15 at 23:31
  • @Chebhou I already looked at that earlier, thanks though. This question is quite different, not so much though. – blackhole May 05 '15 at 23:33
  • you need a line straight from one point to another ? you can use render.drawline() – Chebhou May 05 '15 at 23:35
  • @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. – blackhole May 05 '15 at 23:36
  • OK it's your call – Chebhou May 05 '15 at 23:37
  • @Chebhou If you know how to do this with python that is great. I am not saying I don't want python. Whatever anyone makes, if it works, no one can tell them they are wrong. – blackhole May 05 '15 at 23:40
  • so does the line need to be visible like "drawline" or can you have two rays operating in different directions of each other saying "if both rays but not one ray" – ruckus May 07 '15 at 18:36
  • sorry, that's not very clear. if you have one ray shooting -y from empty 1 and another ray shooting y from empty two, then the area where they both exist is the area between them, so that means you essentially get an area that grows or shrinks based on the distance between the empties and can be sensed by "if both rays". – ruckus May 07 '15 at 18:39
  • @Vince Scalia What i'm hearing is that you think I want 2 rays. I am looking for one ray that updates all the time, and is basically between two points. Yes, it can move around. – blackhole May 07 '15 at 21:04
  • Everyone that has already made a comment; I am sorry about this: I changed the question a little. By "ray," I meant "line." Hope this doesn't cause many issues. Thanks! – blackhole May 07 '15 at 21:08

1 Answers1

1

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

Faceb Faceb
  • 3,885
  • 3
  • 29
  • 51