Problem with changing characters and their collision-masks

Get help using Construct 2

Post » Thu Sep 18, 2014 11:31 am

@little stain: Thanks, it really runs smoother. But, as I wrote, I wanted physics in order to interact with other objects.

Yes, I do know about the image editor and the ability to set different collision polygons. But thats part of the problem. As I wrote before: "Everything fine, but my problem is the changing collision mask. E.G. from square to circle. I tried to connect the character-change with a change to a different animation frame of the placeholder which has the circle collision-mask applied. That doesn't work, the character doesn't change and freezes."
The change from square to circle (with the change of the collision masks) results in the game freezes.

Furthermore: If my characters don't have physics on, they remain straight and don't take the angle of e.g. a ramp they're stepping on. As in your project-file. Check by yourself.

@RandomOutput: Thanks for the "if playing..."-tip.
Last edited by Held on Thu Sep 18, 2014 11:54 am, edited 1 time in total.
B
5
S
1
Posts: 45
Reputation: 463

Post » Thu Sep 18, 2014 11:46 am

Why would they need physics to interact?
And if you are going to use physics for that why not completely make your game in physics, because a well known issue is that physics doesn't interact well with other behaviours?

The "problem" of the characters staying straight can be solved with programming, no need for physics there..

If you are going to change collisionmasks one thing to make sure is that when the new collisionmask is applied it doesn't automatically overlap another, this can also be done with some programming..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Sep 18, 2014 12:04 pm

Hi,
don't know, what it means to do it completely in physics. Can you explain?

But I need physics for upsetting objects (realisticly), right?

How can I avoid overlapping by code?

Thanks again.
B
5
S
1
Posts: 45
Reputation: 463

Post » Thu Sep 18, 2014 12:22 pm

@Held, I'm guessing the problem comes with switching a smaller collision ( Circle ) with a bigger one ( Square ) Causing the collision mesh to get stuck in the solids. Have you tried offsetting the position of the Square character on change so that when you change it lifts it ever so slightly above the ground? You could also, so it does not get stuck if you change by a wall, get construct to check if there are any objects to the left or right of your character ( based of a certain distance ) that would either prevent or allow a switch if there was a risk of the collision mesh getting stuck. If you can provide the .cpx I might be able to give it a look over. If you worried about game ideas just strip everything that is not needed out of it.
B
7
Posts: 61
Reputation: 417

Post » Thu Sep 18, 2014 12:31 pm

Sounds like that might be the problem. For practice, I will try to work it out. If I stuck, I'll provide the capx and be glad, if you could take a look. I will give a report.

Thanks!
B
5
S
1
Posts: 45
Reputation: 463

Previous

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, Sup with that? and 71 guests