Speed > 0 while not moving.

Bugs will be moved here once resolved.

Post » Sat Jun 30, 2012 1:26 am

I was trying to make a condition:

* While the player is climbing a ceiling, and his speed < 5, play the climbin_ceiling_standby animation;
if not, play the climbin_ceiling_movement;

for my surprise, if the player is not moving (stuck in a diagonal ceiling, for example) his speed is different of 0, instead of the real speed, it show the speed like when he is moving..

So, I think something is wrong with his logic.. I did an old workaround to contour this issue with the jumping speed, setting his speed to 0 every time he stop for any reason (like jumping and sliding a wall after the jump) because his speed was keeping the same valor while sliding the wall and when he was realizing that pose, he was being shot of the wall, and not accelerating like in the normal way, so, when I reset his speed, he started to gain speed like in normal way.

But now, I checked this thing again, and it's happening for everything.

so, resuming, what need to happen:

- Object not moving -> Speed like 0;
What is happening:
- Object not moving -> Speed accelerating like when moving, so, never like 0;

How will impact my game:

Many things, I want check when the player is really moving or not, even if the player is pressing to walk and hitting a wall, if it happen, the speed need to be 0, not the old walking speed, like is happening..

So, the logic can go for much more things..

The CAPX and the sample game are here:
https://dl.dropbox.com/u/47035927/temp/SandBox-R024.capxTELLES08082012-06-30 02:31:29
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Mon Jul 02, 2012 6:22 pm

Please see how to report bugs - it can take hours for us to investigate projects with this many events, and often the conclusion is it is simply a mistake in the events and not a C2 bug. We can't possibly spare the time - please try to reproduce the problem in a minimal new project.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Wed Jul 18, 2012 7:00 pm

I was trying to reproduce it with boxes, and saw something what maybe is doing the speed different from 0 when in collision with a wall.

It's straight related to the collision detection. When I have the time I'll work on it to see what's happening to show here.

EDITED:
Ashley, I found the cause.
When you make a new sprite object, import frames of different sizes and edit it's collision box inside the editor, it'll keep the size of the first frame, and the collision box will set the percentage of this first collision box too.

I found it accidentally after this issue: http://www.scirra.com/FORUM/shaking-screen-and-player-position_topic54555.html?KW=

Where I started a new sprite and after loading the image inside the editor, it keeped the old size for the collision box. It explain why the hell on a standing animation the character is moving a very little bit, keeping the speed different from 0.

Re-cheking my main project, where the player have a lot of animations, I detected some animations was imported with different sizes and after this, I just edited the images outside the software to maintain the same size of the very first frame, but when re-loading them, they keep the old size for the collision box, even thought showing the right coordinates on the editor.

I solved it exporting the project in folder and editing all the files where this sizes and percentages are presents.
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest