Collision & Rotate Question

Get help using Construct 2

Post » Sat Mar 16, 2013 4:17 am

Hi, I have a question regarding Collision Polygons and the Rotate behavior. I am making an iOS game with CocoonJS and the thing is, the collisions are crazily laggy when it comes to my enemy sprite (which has a square polygon) and the ground which is a slope.

The enemy sprite is rotating, and my speculation is that its lagging so badly because when it rotates and hits the ground, the math the game is doing to calculate its movement from there and all the rotating and collision detection lags the game?

Is it possible to rotate the sprite a different way without rotating the collision polygons? not through animation.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sat Mar 16, 2013 7:28 am

Could you have invisible `collision` sprite pinned to it with position only?
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Sat Mar 16, 2013 5:55 pm

Hmm, I never considered that, but would be really inconvenient :/
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sat Mar 16, 2013 6:10 pm

Not really, put them in container and it all works pretty smoothly. :-) I'm not familiar with your particular case of course.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Sun Mar 17, 2013 3:02 am

Oh yes! Containers!
Thank you @vee41
B
36
S
10
G
6
Posts: 948
Reputation: 11,101


Return to How do I....?

Who is online

Users browsing this forum: Braus, spcsmrf and 14 guests