How do I manage collisions on an isometric car

Get help using Construct 2

Post » Tue Apr 11, 2017 11:05 am

I have a Pre-Render car with isometric view that have 96 rotation frames.

Do the collision boxes for the 96 frames will be a pain, so how i can do in an easy way?

I can have a isometric shadow/detector in 96 frames for the collision, but the same problem i will have to "guess poligon box" one by one for each frame :S .

Any idea?
B
26
S
10
G
3
Posts: 589
Reputation: 4,605

Post » Tue Apr 11, 2017 12:09 pm

Try creating a invisible object to detect the collision instead of the car and as you rotate the car you also rotate the invisible object.

The collision box won't be as sharp as setting the collision points on each of the 96 frames, but at least it will rotate along with the car which is more accurate then setting a fix bound box to all frames.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Tue Apr 11, 2017 12:46 pm

I already tried this, but if you rotate will make in some directions the collision will be wrong due the car perspective.

I mean the collision box have to change in each frame to get perfect to the car. Example:

Image

So, to get that or something aprox to this i will have to do some kind of maths to do a collision box in a sprite and after that: Every tick > Rotate + set X width/height to transform

And i don't know if this will works, still i have to play with that idea.

This will be more easy if Construct will also have some "guess polygon box for each frame" so with the shadow pre-render i apply that and in a second i have what i need.
B
26
S
10
G
3
Posts: 589
Reputation: 4,605


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests