How do I pin a smaller object into a rotating object.

Get help using Construct 2

Post » Sun Jul 05, 2015 5:48 am

I'm a newbie to this Construct 2 software and I would like to ask for help.

How do I pinned a smaller object, let say a circle into a larger rotating circle? I have trouble pinning them both as the smaller circle kept floating around the rotating circle. How can I fix this problem?

I need help urgently. Please.
B
2
Posts: 5
Reputation: 160

Post » Sun Jul 05, 2015 7:48 am

What exactly are you trying to do? The pin behavior will pin a object to another object position,
So it seems to be working just fine, what do you expect to happen?
B
17
S
7
Posts: 277
Reputation: 2,514

Post » Sun Jul 05, 2015 2:16 pm

If you are using physics, use the joint actions, like a revolute joint. Otherwise you might be looking at using the normal pin behavior or setting position every frame. You can reference image point positions using [object].ImagePointX() and [object].ImagePointY().

Example: http://www.mediafire.com/download/g0b23 ... ysics.capx
B
42
S
14
G
3
Posts: 165
Reputation: 5,115

Post » Sun Jul 19, 2015 4:14 pm

Sumyjkl wrote:If you are using physics, use the joint actions, like a revolute joint. Otherwise you might be looking at using the normal pin behavior or setting position every frame. You can reference image point positions using [object].ImagePointX() and [object].ImagePointY().

Example:


Thanks for giving me an answer Sumyjkl ;) I tried my best but so far it didn't really worked, the smaller object that wanted simply ran all over the interface. Anyway, I'm building game similar to ROTO (a mobile game for Android and iOS), so I would like you to gave me example on how to use revolute joint for my game. Sorry for the late reply, I'm too preoccupied with my exams for the past weeks.
Last edited by shacklesmith90 on Sun Jul 19, 2015 4:52 pm, edited 1 time in total.
B
2
Posts: 5
Reputation: 160

Post » Sun Jul 19, 2015 4:17 pm

RayKi wrote:What exactly are you trying to do? The pin behavior will pin a object to another object position,
So it seems to be working just fine, what do you expect to happen?


I'm trying to replicate the game ROTO (a puzzle game for Android and iOS), so I would glad if anyone here can lend me some help. :)
B
2
Posts: 5
Reputation: 160

Post » Sun Jul 19, 2015 5:09 pm

To recreate ROTO you wouldn't need any pinning would you?

To me it seems using platform behaviour and setting the angle of gravity towards the closest "planet"would suffice..
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 » Sun Jul 19, 2015 5:12 pm

LittleStain wrote:To recreate ROTO you wouldn't need any pinning would you?

To me it seems using platform behaviour and setting the angle of gravity towards the closest "planet"would suffice..


I've tried adjusting the behaviour and setting up the angle of gravity but the smaller circle sphere wouldn't stick to the bigger circle.
B
2
Posts: 5
Reputation: 160

Post » Sun Jul 19, 2015 5:20 pm

I'm sure I had a better example somewhere, but this is a basic implementation:

https://dl.dropboxusercontent.com/u/485 ... tform.capx
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 » Sun Jul 19, 2015 6:08 pm

Message: shacklesmith90 is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
LittleStain wrote:I'm sure I had a better example somewhere, but this is a basic implementation:


It work's, but the tiny circle stays right where it fell and bumped over and over again to the same place. It also didn't follows the bigger one rotation flows.
B
2
Posts: 5
Reputation: 160

Post » Sun Jul 19, 2015 6:19 pm

shacklesmith90 wrote:
LittleStain wrote:I'm sure I had a better example somewhere, but this is a basic implementation:


It work's, but the tiny circle stays right where it fell and bumped over and over again to the same place. It also didn't follows the bigger one rotation flows.


Like I said, it's basic, but it works..

I found another example I downloaded and improved which does use pin and the bullet behaviour instead of platform..

https://dl.dropboxusercontent.com/u/485 ... roved.capx

Like you see, there are many ways to implement something like this..
It doesn't take many events either, but you'll always have to adjust it to fit your needs..
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


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests