Isolate Physics to Certain Layers or Groups

For questions about using Classic.

Post » Mon Dec 27, 2010 2:04 pm

It seems like once you apply the physics behavior to a group of sprites they all behave as though they are sharing one physical world. I would like to be able to have some interact separately from the group, as if it were on a different layer, for example multiple depth of action (excitebike comes to mind). Anyone know of the simplest way to do this? It would be simple enough to do with if-then statements in a normal collision, but the physics engine has its built in way of doing things...
B
17
S
2
G
2
Posts: 5
Reputation: 1,294

Post » Mon Dec 27, 2010 3:37 pm

The only ways I can think of are:

1. Using the 'disable collisions with' action - though I'm not sure if that disables collisions with individual instances or entire objects. You might need different objects for each layer.

2. Create a 'projection' - have the physics simulation happen somewhere else in the layout offscreen somewhere, then for each sprite create and place another that doesn't have physics at the location of the physics sprite adjusted so it appears on screen. Like if the physics sim starts at x 1000, then create/place the object at physicsobject.x-1000.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Mon Dec 27, 2010 8:48 pm

Hmm, okay thanks! I had thought of the projection approach but it seemed like there ought to be a simpler way, but maybe this is that way...
B
17
S
2
G
2
Posts: 5
Reputation: 1,294


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests