Physics: the rest of box2d

Post your work in progress addons and get feedback

Post » Sat Nov 28, 2015 7:02 pm

@Colludium you may find the above post showing how to enable prismatic joints useful. You might find a use for it that you can't live without :)
Image
B
32
S
11
G
2
Posts: 563
Reputation: 5,096

Post » Sat Nov 28, 2015 7:05 pm

@saour @Colludium - One more thing, make sure you back up any project game file before trying this stuff out. If you add this and then take it out later, or be dumb like me you can find nefarious and subtle ways to corrupt a save file. This is true of adding and changing any behavior in a project. Mostly problems exist when you remove an action or property that a save file references.... and let me tell you, editing the construct 2 json file is not fun but is the only way to fix it if you have no backup.
Image
B
32
S
11
G
2
Posts: 563
Reputation: 5,096

Post » Sat Nov 28, 2015 7:28 pm

@ruskul - this is awesome - thank you! I managed without hacking the standard plugin for umbra, but it was a massive pain not having kinematic bodies (for crying out loud!) and access to raycasting etc. I'm going to make these changes to a copied branch of the standard physics plugin, and I will then change the name so there can be no confusion - I also have a rather haphazard filing process for my stuff!!
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
69
S
18
G
65
Posts: 2,195
Reputation: 41,465

Post » Sat Nov 28, 2015 8:06 pm

Hey @ruskul thanks for the reply.
I get this error when i try to run a project with two physics bodies with prismatic joint attached .
Uncaught ReferenceError:b2prismaticJointDef is not defined
I follow exactly your instructions . Is there anyway i can fix this?
Cheers

Never Mind i fixed it.

Just in case anyone is interest . in the runtime .js
at line with
// Import Box2D names
var b2BodyDef = Box2D.b2BodyDef,
b2Body = Box2D.b2Body,
b2FixtureDef = Box2D.b2FixtureDef,
b2Fixture = Box2D.b2Fixture,
b2World = Box2D.b2World,
b2PolygonShape = Box2D.b2PolygonShape,
b2CircleShape = Box2D.b2CircleShape,
b2DistanceJointDef = Box2D.b2DistanceJointDef,
b2PrismaticJointDef = Box2D.b2PrismaticJointDef,
b2RevoluteJointDef = Box2D.b2RevoluteJointDef;

and you are ready to go.

Again @ruskul realy thanks for that !
B
36
S
15
G
1
Posts: 59
Reputation: 3,441

Post » Sat Nov 28, 2015 9:45 pm

@saour - sorry about that, glad you figured it out. I typically comment all the things I change so I can find them again but I must have missed that!
Image
B
32
S
11
G
2
Posts: 563
Reputation: 5,096

Post » Sat Nov 28, 2015 11:18 pm

@ruskul No worries mate.
B
36
S
15
G
1
Posts: 59
Reputation: 3,441

Previous

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 2 guests