Making an actor follow a circular or parabolic path with a fixed starting and end point
Coolgamer
Member Posts: 16
Hello Everyone,
Can I make an actor follow a semi-circular or parabolic path, with a fixed starting, end point and also have the capability to change it's velocity while traveling based on if touch is pressed or not. I am trying to do it but unsuccessful so far.
Would really appreciate your help.
Thanks,
Andy
Can I make an actor follow a semi-circular or parabolic path, with a fixed starting, end point and also have the capability to change it's velocity while traveling based on if touch is pressed or not. I am trying to do it but unsuccessful so far.
Would really appreciate your help.
Thanks,
Andy
This discussion has been closed.
Comments
I made this quick demo for you , it should help you get started , every aspect of the movement is editable by the attributes .
http://www.mediafire.com/?pdzcrby4fynbevq
Cheers
Roy.
Cheers,
Andy
Thanks for sharing this!
RThurman
http://www.mediafire.com/?48nrzv21cbjvc8j
http://www.mediafire.com/?adhssbstywcncuy
8-X
1) travel in a semicircular path,
2) or a parabolic path,
3) have a fixed starting point,
4) have a fixed ending point,
5) and change speed.
I thought to myself "I'm not touching that one! It will take at least there separate iterations for each criteria before this request will be satisfied (and probably many more)." Maybe I took the original question too literally.
The way P-O-M set things up really makes it easy for users to experiment with the different parameters until they get just the form and speed they are looking for. That's what I was gushing at! (And I guess I still am.)
RThurman
Cheers
Roy.
Thanks everyone for your replies. I really appreciate everyone's input to the answer.
I used POM's solution and found it a well fit to my problem here, as I sometimes need parabolic paths too.
Question: All the criterias are being covered by the solution except the last one (Change speed dynamically during flight).
I am using my own real variable instead of self.Time (under constrain attribute)for predefining the parabolic path(fixed starting point), and interpolating the variable to a final value (completes the parabolic path). I was wondering if there is a way to change the interpolation duration dynamically for making the object fast or slow. I tried using a variable which changes it's value when screen is pressed or released dynamically but it did not work. The parabolic movement was becoming glitchy by changing the interpolation duration variable on the go.
Thanks for your help.
Andy
I know I am somewhat bad at explaining my problem, and I did a really bad job while explaining it in the post above..
Man, I have been struggling a lot with this problem of changing an object's speed while performing the parabolic or semicircular movement.
Would appreciate a ton for some guidance towards how to approach it..
Andy
RThurman
I tried doing that and changed "game.speed" while the object was in parabolic motion (based on user's touch pressed or not).. The result was that it changed the position of the object abruptly and the animation did not go smooth.. I think the reason for this happening is that game.speed is being included in the Sine & Cosine terms of constraint position X and Y, so any change in game.speed effects the position of the object..
Can you please look into the issue or suggest an alternate solution..
Thanks,
Andy
RThurman
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User