[request] Enable/Disable Physics

Discussion and feedback on Construct 2

Post » Fri Jan 25, 2013 3:30 pm

Can we please have the ability to enable/disable the physics behavior during runtime? My player needs to be able to switch between the physics behavior and platform behavior at any time. A separate object could be used but this would be much more convenient.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Fri Jan 25, 2013 4:35 pm

I ended up recreating the platform behavior by using physics, using a lot of onGround, isMoving type variables. I've got a live demo of it embedded here in the middle of this page http://crudepixel.com/2012/12/making-games-prototyping-pt2/
B
39
S
12
G
8
Posts: 580
Reputation: 7,108

Post » Fri Jan 25, 2013 5:08 pm

[quote=Manual]Physics actions: Global settings

These actions affect Physics behaviors in general, not just the one it was set for.

Enable/disable collisions
By default, all Physics objects collide with each other. You can disable collisions between the object and another Physics object so they pass through each other. This affects all instances of both object types. Note: enabling collisions again when objects are overlapping can cause instability in the simulation.[/quote]

Perhaps in conjunction with setting the objects with physics to immovable it could be close enough to enabling/disabling ?

IIRC, there was an example of switching between physics and platform behavior that was quite a while ago and is listed in the how do I FAQ (link in my signature).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Jan 25, 2013 5:30 pm

Hmm well my player is well into development with the platform behavior already. I just wanted to tack on the physics behavior for a grappling hook/swing since it'd be much easier than hacking up the platform behavior for that. I've found a few non-physics grappling hook examples but nothing really cuts it :\ I just did a few tests with the physics behavior and that didn't turn out very well either. Hrm..
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sun Jan 27, 2013 4:03 am

I would really like to check out your demo, but I am getting a 404 error in Chrome. Is it still on there?
B
11
S
2
G
1
Posts: 108
Reputation: 1,899


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests