Need Help! Creating a curving, bending line!
JagonApps
Member Posts: 241
Hi there!
I am looking to create an actor which is in the shape of a line, which can curve left and right and bend, according to preset parameters/rules, rather than for example following a mouse position.
If you can't visualise this, imagine the game snake, but instead of you moving the snake, it moves by itself (in a smooth motion however).
Perhaps I am not using the right terminology, but I can't find any resources or help guides on how I might do this.
Thanks for any help
Max
I am looking to create an actor which is in the shape of a line, which can curve left and right and bend, according to preset parameters/rules, rather than for example following a mouse position.
If you can't visualise this, imagine the game snake, but instead of you moving the snake, it moves by itself (in a smooth motion however).
Perhaps I am not using the right terminology, but I can't find any resources or help guides on how I might do this.
Thanks for any help
Max
Best Answer
-
Socks London, UK.Posts: 12,822
Surely though you didn't create that effect in Gamesalad???
Yes, it's all GameSalad, in fact it's a very simple project, just two actors - and two or three pretty simple rules in each actor doing nothing more exciting than moving and rotating. It looks more complex than it is.I thought what @gyroscope was saying was that he was showing a solution, but it would only work with joints. And I thought the amount of segments required to make it smooth would be unworkable.
You don't really need joints for something as simple as this, it's all going in one direction after all, there's nothing complex going on here, you could send a circle along a path, then send another circle along the same path 0.2/second later and another 0.2/second after than (and so on) to build up a moving 'snake' - try it, it's more straightforward than you might imagine.
So...you have done it without joints???
Answers
Hi @JagonApps I'm thinking this can't be done yet, sorry to say (although I could be wrong...) I say "yet" because if/when we have joints, it'll be no problem.
Slightly in this ballpark, for interest, you can have a single actor follow curved and bendy paths (these paths made invisible if needed).
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
----BUMP---
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Ah, I see, sorry to be unclear... I shouldn't have added the bit about following curves, etc., but I'll repeat that this would work only for a single actor, not an "articulated" set of actors....
So I can't really think of a workaround, even a less effective one, I'm afraid.... hope someone else chimes in with an idea tho'...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Ok guys, this is your queue to jump in with a some work around... :P
And thanks re: my new website... I'm a bit ashamed really, it's been "stuck" that way for far too long; I really must update it....
---------
----BUMP----
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks for the bump!
Speaking of which...
Bump!
What @gyroscope said should pretty much cover it, just send each segment of your snake (or whatever) down the same path - but later segments are offset in either time or position.
I've attached a little Quicktime movie of the finished effect . . . . . .
Surely though you didn't create that effect in Gamesalad??? Surely? **jaw drops**
I thought what @gyroscope was saying was that he was showing a solution, but it would only work with joints. And I thought the amount of segments required to make it smooth would be unworkable.
So...you have done it without joints???
If this is true, I would love to see the GS file of how if that is ok?!
Max
Incredible! Thanks so much I will try that out!
And thanks to @gyroscope as well, you have both been a great help!
Cheers
Max