How do I jump and detect collision while sprite is pinned

Get help using Construct 2

» Tue Sep 22, 2015 11:59 am

Hey guys

I'm new to construct and first wanted to say hello to everyone. Construct is a great tool!

At the moment i try to develop my first game with construct and there is still a lot of things to learn ^^

Now i have a problem and i don't understand how to solve it...

I have a small ball and i pinned it to invisible square. Now i set a rotation behavior to the square to let the ball rotate. And the ball is trapped inside a circle segment with a solid behavior.

Now everytime i press the space bar i want the ball to jump into the center and then land on the circle segment.

But i dont know how to set the jump and the collision with the circle segment while the ball is pinned and rotated.

Maybe later i post a pircture for better understanding.

Thank you guys!
B
7
S
2
Posts: 25
Reputation: 507

» Tue Sep 22, 2015 12:04 pm

which behaviours are you using for the movement?
Why are you rotating the square and not the ball itself?
What do you mean by "trapped inside a circle segment with solid behaviour"?
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

» Tue Sep 22, 2015 1:21 pm

I'm at work at the moment but i will post a picture later with a more precisely descrition
B
7
S
2
Posts: 25
Reputation: 507

» Tue Sep 22, 2015 5:30 pm

Hello guys,

this is a picture of what i'm doing at the moment.

I tried some different ways to let the ball spin 360 degress inside of the circle (with collision) but nothing really worked for me...
The ball should move the whole time 360 degrees on its own so i did this:

I pinned the ball to the square to let the ball "roll" inside the circle. But now i don't have collisions anymore.
Also i want the ball to jump towards the square everytime i push the space-bar and the fall again to jump over some obstacles.

The ball hast "platform" and "physics" behavior attached and the circle outside "solid" behavior.
I hope you understand what i want to do and someone can help me

Thanks

B
7
S
2
Posts: 25
Reputation: 507

» Tue Sep 22, 2015 7:42 pm

I see a number of issue here..

First:
Mixing physics with other behaviours always gives unexpected results.

Second:
Physics doesn't respond to the solid behaviour.

Third:
Seems like you are trying to use the inside of a collision polygon of an object with the solid behaviour.
This is not the way it is intended to be used, because the inside of the collision polygon is supposed to be solid.

A much better way would be to create the circle with a number of sprites so the outside of the collision polygon can be used.
This might already solve most of your problems.

I guess if I were to make it I would choose not to use any behaviours at all and work with radius and move at angle..
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

» Wed Sep 23, 2015 6:06 am

Thank you very much

A lot of good advice! As mentioned before i'm new to construct and there is still a lot of thing i have to learn
I'm gonna go in for a closer look and i hope i can solve the problems.

if not, i'm gonna leave a message again!
B
7
S
2
Posts: 25
Reputation: 507

» Wed Sep 23, 2015 9:54 am

Good luck!
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 15 guests