Timeline for How to make a beam follow a path in xna
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 30, 2012 at 16:27 | history | migrated | from stackoverflow.com (revisions) | ||
May 29, 2012 at 19:55 | comment | added | user1424132 | I can implement the class I actually use it for enemy patterns in my game so I can handle that. | |
May 29, 2012 at 19:28 | comment | added | Phillip Schmidt |
I was about to mention that I'm almost positive XNA will have something to do it for you. I haven't worked a lot with XNA so I couldn't think of one. But I do remember curve . So do you need help implementing the curve class or can you get that part on your own?
|
|
May 29, 2012 at 19:26 | comment | added | user1424132 | I'm planing on using the xna curve class to get the points between the player ship and an enemy that is on screen | |
May 29, 2012 at 19:02 | comment | added | Phillip Schmidt | Kind of. It's calculated using what called the 'least squares method'. An explanation of that method would be out of the scope of this answer, and it too requires some pretty high-level math (at least in nonlinear situations). Last question: where are you getting the points from? Do you have an equation for them, or are you just coming up with them yourself? | |
May 29, 2012 at 18:52 | comment | added | user1424132 | no it doesn't have to go through every point. And I have never here of a best fit curve until now. But i'm assuming that it would take the shortest path from start to end. | |
May 29, 2012 at 18:50 | comment | added | Phillip Schmidt | Also, do we know anything about the nature of the curve? Is it going to depend on user input? I.e, is the equation of the curve going to be ever-changing? If so, you're fairly screwed here without some extremely complex math. | |
May 29, 2012 at 18:44 | comment | added | Phillip Schmidt | And does it need to go exactly through every point, or would a best-fit curve work? | |
May 29, 2012 at 17:52 | comment | added | user1424132 | Yes I want the laser to follow a curve. I have been playing around with some code and I can make lasers go in a straight line just fine so far. | |
May 29, 2012 at 15:59 | history | answered | Phillip Schmidt | CC BY-SA 3.0 |