set position to object a pixel off (solved)

Get help using Construct 2

Post » Mon Jul 15, 2013 2:57 pm

As my title suggests, sometimes when I set an object to another object it ends up a pixel off. If I move the player or the camera slightly it will line up how I want it to. But move again and its slightly off again. Is there anyway to fix this? Maybe reset the object to a position over and over again. It wouldnt be a problem but I am using low res graphics where one pixel makes a difference.aldo2013-07-15 23:27:37
B
6
S
3
G
2
Posts: 104
Reputation: 1,960

Post » Mon Jul 15, 2013 4:30 pm

It probably has to do with the fact that (i'm assuming) the object isn't moving pixel by pixel but will actually move between pixels (IE, at any point the object can be at a position like "X: 6.245")

If that is true for your game, then you might want to try some other form of movement. But I'm not 100% sure if this is the problem or if doing this will fix it.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Mon Jul 15, 2013 5:21 pm

are you using pixel rounding?
got a capx?
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Mon Jul 15, 2013 8:41 pm

I think I've seen people solve this w/ INT, which rounds to a whole integer number as opposed to float or in your case whole pixel number.
B
28
S
16
G
12
Posts: 208
Reputation: 9,137

Post » Mon Jul 15, 2013 11:27 pm

I toggled pixel rounding off and it fixed the problem! Everything moves so nice ans smooth now. Thanks California!
B
6
S
3
G
2
Posts: 104
Reputation: 1,960

Post » Tue Jul 16, 2013 6:47 pm

(y)
B
18
S
5
G
4
Posts: 568
Reputation: 5,079


Return to How do I....?

Who is online

Users browsing this forum: Gokee, Google [Bot], tarek2 and 1 guest