How do I Perform Physics Actions

Just started using Construct 2? Post your questions here

Post » Mon Mar 21, 2016 10:32 pm

I'm working on a project and I'm looking to accomplish certain physics actions on a ball object. I've tried different things but I'm not sure of the differences in behaviors. Here's a rundown (I'll add new ones once I get each one working):

- A conveyor belt mechanic that moves a ball along in the direction the conveyor is facing (mirroring would be needed)
- Changing the ball's gravity when it passes through a sprite as it moves along

Hopefully this topic can help others as well looking to accomplish the same/similar physics actions. I was able to get a working 'gear' that rotates once the ball hits it. If anyone's interested in seeing that then let me know.
B
207
S
116
G
8
Posts: 140
Reputation: 20,926

Post » Tue Mar 22, 2016 2:41 am

Curious, what exact native behaviors are in use here for what you have so far? A capx may help.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 524
Reputation: 19,600

Post » Tue Mar 22, 2016 10:50 pm

Currently all of my objects that will operate have Physics (immovable; drag/drop) and collision turned off whilst I've contained a Physics sprite to each object that will trigger the actual event. It made sense to do things this way so the sprites can animate AND not affect the physics of anything else; following a lot of tutorials really helped out.

For the 'Gear' object, I created a rectangle sprite and a circle sprite each with Physics (immovable) -> arranged 4 rectangle sprites to the circle in a proper pattern -> Pinned them to my 'Gear' object that has rotation -> Have the 'Gear' rotate when the 'Ball' collides with either the rectangle or circle sprite with a set rotation (max 100 pix).

I'll get a capx available soon.
B
207
S
116
G
8
Posts: 140
Reputation: 20,926

Post » Tue Mar 22, 2016 11:02 pm

B
207
S
116
G
8
Posts: 140
Reputation: 20,926

Post » Mon Mar 28, 2016 5:05 am

After some searching, I was able to get some sort of conveyor belt working. However the ball object gets hung up on the end of the belt AND it looks whatever bounciness it had when it falls.

https://www.dropbox.com/s/ihh1970oiqyppu7/Physics%20Objects%20Testing%20-%20GEAR%2BCNYBLT.capx?dl=0

Does anyone have the solution to this issue, along with any ways to improve the Gear object?

Next is trying to get the Anti-Gravity and Blowing Fan objects working in the future.
B
207
S
116
G
8
Posts: 140
Reputation: 20,926


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests