SSK2: Moving an object but not using its current facing

Hi Ed,

With SSK, is there a way to move an object regardless of where it’s facing at… (eg. just move the obj to a vector even if it isn’t facing the vector)?

Santi

There are a number of ways to move objects with the ssk.actions.* lib.

ssk.actions.* Part 1 - https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions1/

ssk.actions.* Part 2 - https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions2/ 

Move w/o Physics -  https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions1/#non-physics-movement-move

If you want to move with physics in a fixed direction at a fixed rate (not forward), you don’t need SSK2 at all just use set.linearVelocity().

If you simply want to move something by a fixed amount, again you don’t need SSK2.  Just use obj:translate(x,y).

Note that the actions library only adds complex and non-existent features to the mix.  If pure Corona can do it already, I did not add it.

Sorry I didn’t elaborate on my question.  I agree I don’t need SSK2 just to move objects around.

What I actually meant was:  I already have existing code in my game using SSK2 where some objects follow (chase) another object(s), using actions.movep.forward() in conjunction with actions.face().   Trying not to change much on the code, I was wondering if I could make a variation where those objects still chase their “targets” without facing them.

But yes, I could switch to pure Corona way of doing it otherwise.

Thanks

Santi

You can do this, but there are a few steps.

I’ll give this a going over tomorrow and post the code you need.

-Ed

Thanks a lot Ed,  when you have the time.

It’s the convenience of using your functions that I prefer using it.  It gives me more time to focus on game/level design than meddling with code ;) 

-Santi

I came up with a couple of options.  The aren’t in the official action.* lib yet, but you can get the update for movep.* here:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2017/10/moveWOFacing.zip

https://www.youtube.com/watch?v=Y7f2BqzKKO0&feature=youtu.be

Awesome!  Thanks a lot @Ed.

Your support is always very much appreciated.  

-santi

There are a number of ways to move objects with the ssk.actions.* lib.

ssk.actions.* Part 1 - https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions1/

ssk.actions.* Part 2 - https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions2/ 

Move w/o Physics -  https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/actions1/#non-physics-movement-move

If you want to move with physics in a fixed direction at a fixed rate (not forward), you don’t need SSK2 at all just use set.linearVelocity().

If you simply want to move something by a fixed amount, again you don’t need SSK2.  Just use obj:translate(x,y).

Note that the actions library only adds complex and non-existent features to the mix.  If pure Corona can do it already, I did not add it.

Sorry I didn’t elaborate on my question.  I agree I don’t need SSK2 just to move objects around.

What I actually meant was:  I already have existing code in my game using SSK2 where some objects follow (chase) another object(s), using actions.movep.forward() in conjunction with actions.face().   Trying not to change much on the code, I was wondering if I could make a variation where those objects still chase their “targets” without facing them.

But yes, I could switch to pure Corona way of doing it otherwise.

Thanks

Santi

You can do this, but there are a few steps.

I’ll give this a going over tomorrow and post the code you need.

-Ed

Thanks a lot Ed,  when you have the time.

It’s the convenience of using your functions that I prefer using it.  It gives me more time to focus on game/level design than meddling with code ;) 

-Santi

I came up with a couple of options.  The aren’t in the official action.* lib yet, but you can get the update for movep.* here:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2017/10/moveWOFacing.zip

https://www.youtube.com/watch?v=Y7f2BqzKKO0&feature=youtu.be

Awesome!  Thanks a lot @Ed.

Your support is always very much appreciated.  

-santi