Stick actor to point of contact on another actor

I can't find an explanation for how to stick one actor to another actor where it hit it. Sort of like a dartboard. But the dartboard is moving and I want to keep the dart in the same place on the dartboard the whole time once it hits it. Please help :/

Comments

  • GM_PandagamesGM_Pandagames Member Posts: 228
    put when the dart hits the dartboard, change velocity to 0
  • AppTacoAppTaco Member Posts: 125
    Here's a template I just made. It was more complicated than I thought it would be.. Enjoy! :)
    https://www.dropbox.com/s/mpdokxeq9xan0bl/Dart to Board.zip
    Let me know if it helps.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @PureEpicStudios -- very creative! Good thinking there!
  • AppTacoAppTaco Member Posts: 125
    thanks! :) It was a little bit of a mind boggler for me.
  • gineepiggineepig Member Posts: 26
    @PureEpicStudios That was so helpful that you made that template for me. Thanks so much for it. And it makes a lot of sense, it's just in my game, (the dartboard was an example for what I was trying to get at) the "darts" don't have anything to do with me clicking the mouse. So is there something I can do instead of mouse position X that would instead stick it to the edge of the "dartboard" at the place where it first came into contact with it? Assuming, of course that the "dart" was already in the scene. I hope I explained that correctly and again, thanks so much for your help.
  • AppTacoAppTaco Member Posts: 125
    edited September 2013
    @gineepig Glad to have helped.
    So your saying you want the "dart" to stick to the "board" when the "dart" collides into it?
  • gineepiggineepig Member Posts: 26
    @PureEpicStudios Yeah and while the board continues to move.
  • AppTacoAppTaco Member Posts: 125
    @gineepig Cool. Let me see what I can do.
  • AppTacoAppTaco Member Posts: 125
    @gineepig Here ya go! https://www.dropbox.com/s/070b0u0cep76g6s/Dart to Board #2.zip
    Let me know if you have any other questions or if you want me to explain how it works.
  • gineepiggineepig Member Posts: 26
    @PureEpicStudios That was awesome that works perfectly thank you.
  • AppTacoAppTaco Member Posts: 125
    @gineepig Sweet! I wish you the best with your app.
  • gineepiggineepig Member Posts: 26
    @PureEpicStudios So after having implemented your second template into my game, for some reason it just doesn't work. I don't know if it's because I have more than one "board" or because something else went wrong when I was copying everything, but something I can't figure out is what the attribute game.zero has to do with anything. I know that when game.zero = tableCellValue( game.Dart Location ,1,1) then it essentially sticks to it, but what in the game changes game.zero? I tried, since I have more than one board, to make it so that when the board collides with the dart it makes the self position game.boardX and Y but that didn't work either. It appears that there's nothing different between the two games at this point other than the moving rules, so if you have any clue as to what could be wrong, please let me know. Thanks again.
Sign In or Register to comment.