Constrain actor to another and move with touch

Hi guys I used Constrain Attribute to join 2 actors then I put the rule to move them with the touch.
There is a problem when I move them their union does not remain precise but "it is a dancer" when I move the blue actor the red actor seems to follow him with a certain delay. it's probably a very simple thing for you but I can't understand is there a way to fix it? thx all!

Comments

  • UltraLionBluUltraLionBlu Member Posts: 65

    Hi again guys the topic can also be closed. I did it using motion linear velocity !!! Thanks anyway to everyone who has wasted time reading XD

  • UltraLionBluUltraLionBlu Member Posts: 65
    edited January 25

    Sorry maybe I will schizophrenic but I sang victory too quickly. the method I used brings me problems, so I go back to the first question, how can I constrain 2 actors so that they stick together without small delays? :hushed:
    I specify that the actor to be joined to the other should not already be present on the scene. But it would spawn at some point
    Is it a strange bug? It seems like an elementary thing

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    I can't open your files. They just get converted to how constrain.zip.cpgz.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • UltraLionBluUltraLionBlu Member Posts: 65

    @tatiang said:
    I can't open your files. They just get converted to how constrain.zip.cpgz.

    Maybe because it's compressed with winrar to link it I had to change the rar extension to zip, maybe if you rename it from .zip to .rar it opens but only if you have winrar?

  • UltraLionBluUltraLionBlu Member Posts: 65
    edited January 27

    I try to post it with compression directly in .zip

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    That worked.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,926

    I see what you mean and I don't know how to fix that. There is a lag when dragging an actor and having another actor constrain its position to the dragged actor. So they aren't perfectly lined up while they are moving.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • UltraLionBluUltraLionBlu Member Posts: 65

    this does not happen when constrain is used in an actor moved with the keyboard but as we know on smartphones the keyboard is not used and this seems to me a very large defect precludes the possibility of creating a myriad of games maybe I should report it as a bug but who knows how much will be solved ..: / thanks anyway

  • jamie_cjamie_c ImagineLabs.rocks Member, BASIC Posts: 5,660

    Hi, I made an update to this project and it works okay now. I'm not sure the 'fix' will fit your needs though.

    Instead of constraining the movement of the two actors to the saved X and Y coordinates I've constrained them to the mouse/touch location while dragging. There is no lag then. I have no idea why there is such a lag with the other method...

  • bob loblawbob loblaw Member, PRO Posts: 521

    it may be that in between the processing of the two actor behaviours, there’s a bunch of logic being processed causing a delay.

  • UltraLionBluUltraLionBlu Member Posts: 65

    @jamie_c said:
    Hi, I made an update to this project and it works okay now. I'm not sure the 'fix' will fit your needs though.

    Instead of constraining the movement of the two actors to the saved X and Y coordinates I've constrained them to the mouse/touch location while dragging. There is no lag then. I have no idea why there is such a lag with the other method...

    Great Jamie! The only way I had found was to use the instances and force them to the actor through the scene, but it was very uncomfortable, your system I have yet to try it with the rest of my work but it looks much better!
    ps it is also thanks to you if I use gamesalad I was not convinced to jump into this adventure and I saw some tutorials before, for example yours to create the platform explain very well Thanks!

  • jamie_cjamie_c ImagineLabs.rocks Member, BASIC Posts: 5,660

    @UltraLionBlu, great. I'm glad I could help. I just threw that together quick as a test so you might need to play with it some to create a larger project with it. Thanks for the kind words about the other tutorials, I'm glad they helped too! :)

Sign In or Register to comment.