How do I Floating Object Follow Sprite without PIN Behavior

Get help using Construct 2

Post » Wed Aug 05, 2015 11:23 pm

i have a platform behavior object and a sine behavior object that its floating around the PB object, i want that my SB object follow my PB object when its moving, i am using PIN behavior with rope style but don't looks natural, i want my floating object follow the other object with the same style of floating of sine behavior.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Thu Aug 06, 2015 8:44 am

Try using set position to another object and set it SBObject.X and SBOject.Y
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Thu Aug 06, 2015 3:57 pm

TheDom wrote:Try using set position to another object and set it SBObject.X and SBOject.Y


set position to another object just make my object static, i want my object floating around with sine behavior and following my sprite.
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Thu Aug 06, 2015 8:37 pm

B
21
S
8
G
6
Posts: 177
Reputation: 8,134

Post » Thu Aug 06, 2015 9:13 pm

Add the sine behavior to it. Now use lerp to move it smoothly and constantly toward a specific point relative to the player. My example below will give you smooth and floaty movement that is relative to which way the player is facing.

Here is a working example of it with no plugins and just a few events: https://drive.google.com/file/d/0B4Cyki0BEAFdNUxmMzJEYTNWT0E/view?usp=sharing
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Thu Aug 06, 2015 9:47 pm

C-7 wrote:Add the sine behavior to it. Now use lerp to move it smoothly and constantly toward a specific point relative to the player. My example below will give you smooth and floaty movement that is relative to which way the player is facing.

Here is a working example of it with no plugins and just a few events: https://drive.google.com/file/d/0B4Cyki0BEAFdNUxmMzJEYTNWT0E/view?usp=sharing


this is exactly what i want!!!!!!!!!, thank you so much for your help!!!!!!!!!
B
9
S
3
Posts: 142
Reputation: 1,108

Post » Thu Aug 06, 2015 9:58 pm

Majinboo wrote:
C-7 wrote:stuff


this is exactly what i want!!!!!!!!!, thank you so much for your help!!!!!!!!!


Hah you're welcome! I think I commented it pretty well, but let me know if any of it doesn't make sense.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Thu Aug 06, 2015 10:41 pm

@C-7 Very cool solution and useful. I can use this example for something else. Thanks for sharing!
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sat Oct 29, 2016 7:59 am

C-7 wrote:Add the sine behavior to it. Now use lerp to move it smoothly and constantly toward a specific point relative to the player. My example below will give you smooth and floaty movement that is relative to which way the player is facing.

Here is a working example of it with no plugins and just a few events: https://drive.google.com/file/d/0B4Cyki0BEAFdNUxmMzJEYTNWT0E/view?usp=sharing



Thank you so much C-7 !!!
B
30
S
14
G
2
Posts: 28
Reputation: 3,341


Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, MPPlantOfficial, unicornspitfire and 28 guests