Some kind of bug I think

Discussion and feedback on Construct 2

Post » Mon Dec 01, 2014 2:29 pm

Message: anty21ro can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Hi, here is what I am working on and everything is ok: http://robot.bitballoon.com/

A strange thing happens after I cropped the transparent edges of the enemy sprites (SHIFT+Crop).
The enemy does not recongnize anymore the walls.
Here is the link: http://roboterror.bitballoon.com/

robot_ss_1.jpg




robot_ss_2.jpg



I don't know what is wrong.
You do not have the required permissions to view the files attached to this post.
B
38
S
10
G
9
Posts: 212
Reputation: 6,995

Post » Mon Dec 01, 2014 3:46 pm

I have a feeling that the problem is your origin points. Make sure they are in the exact center horizontally. It shouldn't matter where they are vertically.

In the image editor, when editing the image points, right click on the image with the origin selected and choose Quick Assign > bottom.
Untitled.png
You do not have the required permissions to view the files attached to this post.
B
19
S
3
G
1
Posts: 29
Reputation: 1,038

Post » Mon Dec 01, 2014 4:19 pm

Hey, PopperOfCorn thanks alot :). That was the problem indeed. But I really don't understand why is that ... I thought that collision of the enemy and walls should matter. "Enemy (own collision) - On collision with - enemyborder (own collision)"
Sorry if my english is bad. Thanks again !
B
38
S
10
G
9
Posts: 212
Reputation: 6,995

Post » Tue Dec 02, 2014 3:44 pm

You're welcome ;)

The reason it does that is because when the first wall collision happens, the enemy starts moving the other way, not touching the wall anymore, but then the next tick the enemy mirrors itself, and is now touching the wall again, making it move the OTHER way, and un-mirroring itself, and the process repeats. Hope the pictures help.

Capture.PNG


P.S. The blue dot is the enemy's origin point, the red arrow indicates the direction of the enemy's movement, and the green box is the wall collision happening.
You do not have the required permissions to view the files attached to this post.
B
19
S
3
G
1
Posts: 29
Reputation: 1,038

Post » Tue Dec 02, 2014 9:46 pm

Great, I understand now , thank you !
B
38
S
10
G
9
Posts: 212
Reputation: 6,995


Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ, troublesum and 11 guests