Search found 5 matches

by Alex232
Thu Aug 11, 2016 11:21 am
Forum: General Discussion
Topic: Soft constraint implementation
Replies: 1
Views: 553

Re: Soft constraint implementation

If someone has the same problem here is my solution:
The formula to compute the lambda that i used ended up being
F = ( -(Va-Vb) - (Xa-Xb) * beta / h ) / ( h/Ma + h/Mb + gamma )
where body a = ( Va, Xa )
where body b = ( Vb, Xb )
by Alex232
Thu Aug 11, 2016 11:18 am
Forum: General Discussion
Topic: How do you handle many soft constraints acting in one body
Replies: 2
Views: 693

Re: How do you handle many soft constraints acting in one body

Well if some one gets the same problem I made it work using the first approach, which is to update the body speed in each constraint update, Something like: foreach( constraint in body1 ) { lambda = constraint.getLambda() body1.speed += lambda * deltaTime } This may get bias for some constraints act...
by Alex232
Wed Aug 10, 2016 8:39 am
Forum: General Discussion
Topic: How do you handle many soft constraints acting in one body
Replies: 2
Views: 693

How do you handle many soft constraints acting in one body

Another question, when there are many soft constraints acting on one body; do you update the body speed every time you update the soft constraint ? Or do you add up the resulting forces (Lambdas) after I compute the constraint lambdas one by one and then add them up and use semi implicit integration...
by Alex232
Wed Aug 10, 2016 8:31 am
Forum: iPhone
Topic: Box2D in Swift
Replies: 0
Views: 2414

Box2D in Swift

Hi, if i want to use Box2D only, with no Cocos2D and in Swift which one is the best port for Box2D to IOS / Swift ? there is a port of box2D for swift called Box2DSwift, this is the link https://github.com/yohei-yoshihara/Box2DSwift, is this a recommended port ? which one would you use?
Thanks
by Alex232
Tue Aug 09, 2016 1:53 pm
Forum: General Discussion
Topic: Soft constraint implementation
Replies: 1
Views: 553

Soft constraint implementation

Hello, I am working on my own spring constraint and I am trying to use a soft constraint. The presentation in soft constraints was great, thank you, and i was able to implement a spring connected to a fixed point, now i need to create a soft constraint between two free bodies that both move. My firs...

Go to advanced search