Recent content by Jack7

  1. J

    Moving in a straight line with multiple constraints

    I have been experimenting with curves as per malawi_glenn's recommendation and I managed to get some very nice results even with crude curves. I also implemented bob's solution above and it works even better, because there is no curve shaping required. It literally just uses two equations and...
  2. J

    Moving in a straight line with multiple constraints

    Okay thanks, that's very true. I could start by just adding one point and shifting it around until the approximation is good enough. The shape will be very crude but the effect might be satisfactory. I'll give it a go and post some results soon. Thanks again!
  3. J

    Moving in a straight line with multiple constraints

    Ahh! I see! Thank you so much for explaining it like that, that makes a lot of sense! So it sounds like I need to write a custom function. This function needs to: Fix the "v0" and "t0" values to zero Fix the "v" and "t" values to the relevant constraints Use some sort of loop to iteratively...
  4. J

    Moving in a straight line with multiple constraints

    Thanks malawi_glenn, I understand fully what you are saying and I completely agree. The red one is preferable as it will show a smoother acceleration. So then, let's say we do this: We always set v0 = 0 We always set v = our linear velocity target when it joins the circle (varies case by case)...
  5. J

    Moving in a straight line with multiple constraints

    This seems a bit like a chicken and egg situation. If we want v0 to always be positive (one direction of travel), then don't the curve and v0 need to be defined together through manual iteration? Or, here is another question: Can I define one curve, that will satisfy any "s", "v", "t"...
  6. J

    Moving in a straight line with multiple constraints

    Is there an easy way of determining what the v0 should be for a particular curve, such that the area actually is 10? In your case above it's not actually possible given the shape. I am trying to solve this problem programmatically so I see there being two challenges: Constructing a curve in...
  7. J

    Moving in a straight line with multiple constraints

    Sorry erobz, I forgot to reply to #52. You have indeed helped me so thank you. Below is the answer: It basically works as your first explanation described. The game world is three dimensional, but as this segment is top down, the positional co-ordinates of the square are treated two dimensional...
  8. J

    Moving in a straight line with multiple constraints

    Okay so I have re-read this thread multiple times and I think the advice is finally starting to sink in! Talking it through with graphs has definitely aided my understanding. The issue with the first GIF I posted (#31) was that I was forcing the particle to follow a curve that did not satisfy...
  9. J

    Moving in a straight line with multiple constraints

    I can't do that for a very specific reason. In my actual game, there is already a body orbiting at an angular velocity. This new object that is shooting in needs to have half the angular velocity of that existing object, and it needs to shoot in at a very specific time, when the other body will...
  10. J

    Moving in a straight line with multiple constraints

    Thanks pbuk, and everyone else who has been helping me in this thread. You guys are truly awesome for helping novices like me! I am sorry if I frustrate on occasion. The context for this is that I am designing a video game as a hobby in my spare time. I have a need to shoot an object into a...
  11. J

    Moving in a straight line with multiple constraints

    Thanks pbuk for your comments. I am now at least confident that I understand what the equations are trying to do. As mentioned, seeing graphs helps a lot. I appreciate your honest feedback regarding my poor maths, I fully accept that. I need to restudy calculus for sure :doh:.The equations of...
  12. J

    Moving in a straight line with multiple constraints

    D'oh! Of course! You are absolutely right, thank you for showing that as it makes it a lot easier to understand with a visual aid. I can see now why there is an infinite number of possible curves.
  13. J

    Moving in a straight line with multiple constraints

    Apologies that was a typo, I meant to say the area is 40 (20 * 4 * 0.5 = 40). I don't understand how there can be infinitely many such curves. How is this possible? There is only one curve that gives an area of 40 (where v(4) = 20 and the area is always positive), which is what I showed. So I...
  14. J

    Moving in a straight line with multiple constraints

    @malawi_glenn Thank you for clarifying that. What you are saying makes sense to me. My area is 40 so clearly the curve is invalid. It would reach 10m far too soon, which is what I was seeing in my first GIF. This makes sense. Am I correct in thinking that there is only one curve (where v is...
  15. J

    Moving in a straight line with multiple constraints

    Could I please clarify something with you guys before I continue trying to implement your recommendations? Because I still feel that my understanding is lacking, and that I need to get this point clear in my head before proceeding. If I say: I want the particle to accelerate at a constant...
Back
Top