How do I Set position of an object correctly when bouncing

Get help using Construct 2

Post » Wed May 03, 2017 8:57 pm

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?
Posts: 18
Reputation: 261

Post » Thu May 04, 2017 12:09 am

Add the pin behavior to the shadow sprite.
Posts: 125
Reputation: 16,113

Post » Thu May 04, 2017 8:24 pm

Thanks for pointing me in the right direction
Posts: 18
Reputation: 261

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 23 guests