How to make a sprite move to the right and left, BUT when in contact with other sprites, would not be repelled from them?

How to make a sprite move to the right and left, BUT when in contact with other sprites, would not be repelled from them?? For me, either the sprite is immobilized and then does not move when it touches other sprites, or it moves, but then it moves when it touches others. Help me ple
3
ase

1 Like

I would try enabling Ignore Gravity in the sprite’s properties and also constraining the sprite’s y position to its starting y position. You can do that by setting a variable to its y position and then constraining its y position to that variable.

1 Like

Dear @tatiang appreciate if you can close
https://community.thunkable.com/t/hello-how-can-i-make-the-sprite-move-left-and-right-all-the-time/1726296

As it seems by the same member and asking the same thing.

Ignore Gravity is currently enabled. I did not quite understand how to make it so that y does not change. Can you send a code sample please?
I am attaching a request for the project:
https://x.thunkable.com/copy/f3aa8d4f0ea64351eef706096dd8c56c

I thought there was a constrain block but I’m not seeing it. You could try this:

image

This code is not working
image

@jared can you merge this with How to make a sprite move to the right and left, BUT when in contact with other sprites, would not be repelled from them??

1 Like

Try this:

https://x.thunkable.com/copy/3961e1540c575a0d2287655bbfedc6b1

the link doesn’t work unfortunately(

What should the variable be equal to when initialized?

I almost never initialize variables. You can just leave it blank.

I wonder if you are at your limit for projects, perhaps? If not, try this link:

https://x.thunkable.com/copy/062f688518429b9861c49ef769b723a3

Here are the blocks from my project:

:frowning: the project limit has not been exceeded
image

Hmm… I’m not sure what to say. @muneer, are you able to open the link?

1 Like

Yes, I can. The project name is Canvas sandbox copy.

[Update]
@tatiang, I just noticed that you flagged this project as private. I think this is the reason he is not able to remix it. Private projects can only be remixed by PRO members.
image

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.