Adam Ferestad Posted September 5, 2013 Share Posted September 5, 2013 I am trying to find some resources so I don't have to reinvent the wheel on a project I am undertaking. I am going to be building on the idea quite a bit, but the basic immediate goal is to force a particle to move to align it's velocity vector with that of another particle from behind it. What I am trying to do is force a particle to chase a moving object when it starts from any direction. Eventually I will add limits to turn speeds and such, but I just need to figure this out first. I am not even sure where to start with it though. I know that I can dot product the velocity vectors and divide by the magnitude to get the angle between them, though I may have to do this a couple times to get the 3 space measure. Any ideas on where to start? Quote Link to comment Share on other sites More sharing options...
Hudson Posted September 5, 2013 Share Posted September 5, 2013 Hi Adam. I didn't understand what you meant with " I am going to be building on the idea quite a bit, but the basic immediate goal is to force a particle to move to align it's velocity vector with that of another particle from behind it." When you say from behind it do you mean behind the object and in front of the current particle or behind the current particle? From the top of my head you would want the velocity from the particle in front of the current particle. and in front I mean between the object and the current particle. Or have I missunderstood everything? Do you maybe have a reference just so it is more clear? I love maths and vectors. so could try to give it a try whenever I have some spare time Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted September 6, 2013 Author Share Posted September 6, 2013 Hey Hudson. Easiest way to explain it is to explain the end goal. I am working to make an autonomous air combat simulation. I eventually will extend it out to be a full multi-sided simulation with ally assistance and destruction, but for the time being I am just getting the awareness of what is going on with the nearest target working. I have figured out some of my awareness problems, mostly using poppoint() expressions. This is making it rather simple to get this figured out. I also discovered the follow pop a few minutes ago, though I am having some trouble with activation expressions on it. About to just use a switch until i can figure out what it is doing with the activations. The expression I am trying to use to turn on and off the follow pop is $NEARESTDIST > 1 For whatever reason, this is giving me problems with evaluating, for no good reason I can see. The $NEARESTDIST attribute is being created above the follow pops and it is a valid boolean expression. I created an attribute pop with the expression setting the value, and it evaluates just fine. Tried to use the value of that attribute to set the activation, still no dice. The follow pop will make some of this research project rather trivial, but I imagine that I can add in some functionality to bring the bar back up. Quote Link to comment Share on other sites More sharing options...
sanostol Posted September 7, 2013 Share Posted September 7, 2013 beside the math I would suggest to build it as a sopsolver for several reasons and I would build the logic mostly in vops, pop expressions are by far not that flexible and fast as vex sopsolver is needed as in pops point cloud iterations can not iterate on itself in sop you can do it . for this task automatic incrementing ids and some built in pop stuff seems not that important but if you need you could also combine a popsolver with a sopsolver by a multisolverto get both advantages Quote Link to comment Share on other sites More sharing options...
pclaes Posted September 7, 2013 Share Posted September 7, 2013 older file, but might give you some ideas: Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted September 8, 2013 Author Share Posted September 8, 2013 @Sanostol: I am doing it this mostly out of comfort. I haven't had any experience with the solvers just yet (other than the dopsolver) and still don't quite have the comfort level with it. I will say that this is a math research project, so developing my own mathematical solutions to these problems, and essentially writing my own solvers I am sure, is very much what I am supposed to be doing. I am going to look into using the solvers though. My eventual career goal is to be a TD, so I am sure that developing both skill sets would be the best way to go about it. @pclaes: Thanks for the file! From the description you gave in the other post, the methods in it are going to be a good spring point for my own development. Once I get something started this week, I will be posting it. Quote Link to comment Share on other sites More sharing options...
Hudson Posted September 9, 2013 Share Posted September 9, 2013 Alright. It that case I would say the same as Sanostol and go for SOPs. Specially if your goal is to build a solver of your own and develop your skills into becoming a TD. what you are building will be quite cool to see. Good luck mate! Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted September 9, 2013 Author Share Posted September 9, 2013 Thanks Hudson, I am really looking forward to it myself. Unfortunately at this moment I am exceptionally un-versed in the use of a SOP solver. Are there any good resources for me to look at to learn other than the match videos on vimeo? I am planning on going through them over the next couple days and hopefully that will get me moving, but I was hoping for something more pertinent to point animation. It will be interesting setting up a mutual predetor mentality in the points. I am still working out just how I want the reactions to work, but I am looking forward to it. I looked at the file that Peter pointed me to, but it didn't seem to work when i loaded it, so I have spent a couple hours today trying to track down that issue so I can see how it all works together. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.