Drag and release movement

matthew38940matthew38940 Member Posts: 12
edited November -1 in Working with GS (Mac)
I have searched for quite a while and can not find any info (probably due to not knowing how to word the search). I am hoping someone can show a tutorial or something on how to create an actor that will move in a certain direction and speed based on touching the actor then dragging and releasing it. Preferably the actor would stay still until I release from dragging and then it would launch across the screen all based on the distance and direction I dragged. Easy way to look at it would be similar to many pool table games.

Hope that made sense and hope someone can help me out.

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Check out the game salad cookbook there is a video on there that does exactly that

    Ace
  • matthew38940matthew38940 Member Posts: 12
    I looked through and have watched almost all of the cookbook and do not recall this feature. Perhaps I am overlooking it :(
  • mynameisacemynameisace Hull, UKMember Posts: 2,484


    Ace
  • matthew38940matthew38940 Member Posts: 12
    Thanks, but that is not what I am looking for. That shows how to make an actor follow where I am touching. I am looking for something that will help me figure out how to touch, then drag and release and then the actors launches in a certain direction and speed based on how I dragged and released. Think pool table game or like you touch a bow and pull back and then it would shoot an arrow based on the drag. The actor needs to stay stationary while I drag and when I release the drag/touch it takes off. Perhaps I just need to do more research, being new is hard lol
  • Rob2Rob2 Member Posts: 2,402
    You need to look into magnitude (to calculate the power of your shot based on distance of drag) and vector to angle (to calculate the angle of your shot based on direction of drag).
  • matthew38940matthew38940 Member Posts: 12
    Rob2 said:
    You need to look into magnitude (to calculate the power of your shot based on distance of drag) and vector to angle (to calculate the angle of your shot based on direction of drag).

    Thanks, that got me going int he right direction. :)
Sign In or Register to comment.