How do I pin something using the Physics behaviour!?

Get help using Construct 2

Post » Tue Oct 13, 2015 4:08 pm

Hi all,

I know about the revolution and distance joints, but I want to bolt two objects together while only allowing limited rotation.

The objective is to make a physics-enabled 2d space craft game where you have to build a ship out of components. Some components are fixed totally rigidly (e.g. different parts of the main chassis and armour), whereas others (such as directional engines, thrusters and blasters) can be rotated in a controlled way from a pinned location on the vehicle.

Where do I begin?

So far, the closest I've got is using two distance joints at the corners of an object to try and hold it in place, but the distance joints are like rubber bands. I'd rather they were more rigid.

Help?
B
4
S
1
G
5
Posts: 48
Reputation: 1,546

Post » Tue Oct 13, 2015 4:17 pm

I dont think pins work on physics objects.

Make your own pin by:

Every tick ---- Set position----you physics object X and Y. (or the image point you want to glue it too.)
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Tue Oct 13, 2015 5:07 pm

Problem is both objects are physics objects, so I don't think a simple Set Position will blend them the way it should, because the physics engine won't know they're connected.

I've managed an alternative using two Revolute Joints which keep the pinned object in a fixed orientation relative to the parent object.
B
4
S
1
G
5
Posts: 48
Reputation: 1,546

Post » Tue Oct 13, 2015 5:32 pm

You can disable physics on one of them, then the pin might work.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Tue Oct 13, 2015 6:22 pm

It won't. You can't mix Pin & Physics.
ImageImageImage
B
71
S
21
G
221
Posts: 3,650
Reputation: 124,229

Post » Tue Oct 13, 2015 7:10 pm

blackhornet is quite right one cannot mix Pin & Physics. In Physic you could use limited revolute joint, create revolute joint or create distance joint
B
245
S
39
G
15
Posts: 1,946
Reputation: 40,276


Return to How do I....?

Who is online

Users browsing this forum: Centra, DarknessGamingDK and 2 guests