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?
B
4
Posts: 13
Reputation: 226

Post » Thu May 04, 2017 12:09 am

Add the pin behavior to the shadow sprite.
B
25
S
16
G
26
Posts: 125
Reputation: 16,103

Post » Thu May 04, 2017 8:24 pm

Thanks for pointing me in the right direction
B
4
Posts: 13
Reputation: 226


Return to How do I....?

Who is online

Users browsing this forum: Kin, mickclarke, tinhofiel, TRMG, Yahoo [Bot] and 46 guests