0 Favourites

How do I Set position of an object correctly when bouncing

  • I have 2 objects, the first is the player and uses 8direction movement. The second is a sprite that follows the player movement at a fixed distance like a shadow using this event:

    [Every Tick set position of shadow to player.X and player.Y+30], this object has no behavior attached.

    I need the player to be able to bounce off solids and the shadow to make the exact same movements as the player bounces.

    I have tried all the built in behaviors (Bullet bounce off object, 8direction reverse, apply physics force, and car behavior) they all bounce the player off the solid but the shadow does not follow the bounce movement of the player accurately. It seems that the set position event on the shadow does not run correctly when the player is bouncing using any of the behaviors.

    Is there a way for the shadow sprite to follow the exact movement of the player and for the player and the shadow to maintain the set distance between them when the player is bouncing off a solid?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Add the pin behavior to the shadow sprite.

  • Thanks for pointing me in the right direction

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,145
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,500
DMT2005's avatar
DMT2005
Unread hot topic
88 9,242
goldentreee's avatar
goldentreee