0 Favourites

How do I Have an object rebound after getting hit by an enem

  • so all my attempts at this have been mostly straight lines have a look

    WHAT I WANT

    player-

    ########

    #######

    ## #####

    ######

    ####

    ###

    ###

    ###

    enemy

    WHAT I GET

    player ################# P ###

    # ###

    # ###

    # ###

    E ###

    E

    P

    #

    #

    # P###################E

    #

    #

    E

    I tried every thing from vectors to simulate control to move at angle(try to guess which one's which)

    but it just doesn't work call me OCDP but HALP

    P.S.:if you need a better Idea of the curve think about sonic when he gets hit

  • it doesn't count spaces ......

    Great ... just GREAT

  • player-

    -----------########

    -------------------------#######

    ----------------------------------########

    ------------------------------------------######

    --------------------------------------------------####

    ------------------------------------------------------###

    ---------------------------------------------------------###

    ------------------------------------------------------------###

    ------------------------------------------------------------enemy

    WHAT I GET

    player ################# ------------------------P ###

    -----------------------------------------# -------------------------------###

    -----------------------------------------# ----------------------------------###

    -----------------------------------------# --------------------------------------###

    ----------------------------------------E -------------------------------------------###

    ------------------------------------------------------------------------------------------E

    --------------P

    --------------#

    -------------#

    -------------# -------------------------------------P###################E

    -------------#

    -------------#

    E

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Have you tried adding a physics behavior and using Apply force action?

    Even if your not using physics in game specifically you can still enable/disable the behavior as needed.

  • chrisinfinger

    Have you tried adding a physics behavior and using Apply force action?

    Even if your not using physics in game specifically you can still enable/disable the behavior as needed.

    I'm not really good with the physics behavior could you upload a capx please

  • I don't understand any of the --- or ### , so without any further explanation I don't understand the question and as such won't be able to provide an answer..

  • you ever heard of paint? like - use paint to draw what you need, because this doesn't explain anything.

    or give us a CAPX for it.

    but if i understand correctly, you want something like ping pong? use tan function to calculate new angle for the ball or whatever you are using

    to rebound it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,490
DMT2005's avatar
DMT2005
Unread hot topic
64 4,528
nimos100's avatar
nimos100