平移关节允许两个物体沿着某个轴相对平移。平移关节阻止相对旋转,所以只有单一的自由度
var jointDef:b2PrismaticJointDef = new b2PrismaticJointDef();
jointDef.Initialize(world.GetGrou...
everyinch
13年前 (2011-10-03) 6002℃
0喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Collision.Shapes.b2Shape...
everyinch
13年前 (2011-10-03) 4154℃
0喜欢
package{
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Collision.Shapes.b2Shape;
import Box2D.Collision.b2AABB;
import Box2...
everyinch
13年前 (2011-10-03) 4972℃
1喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;...
everyinch
13年前 (2011-10-03) 6233℃
2喜欢
关节角度当body2围绕铰链点逆时针旋转时为正值
GetAnchorA():b2Vec2
GetAnchorB():b2Vec2
GetJointAngle():Number
关节限制(Joint limit)可以限制旋转的范围:
...
everyinch
13年前 (2011-10-03) 7512℃
0喜欢
旋转关节使两个物体共享一个公共的锚点,被称作铰链点;旋转关节只有一个自由度:两个物体的相对旋转,被称作关节角度
var jointDef:b2RevoluteJointDef = new b2RevoluteJointDef();
jointDef.Initialize(p...
everyinch
13年前 (2011-10-03) 8875℃
0喜欢
距离关节:指定两个物体;在世界坐标系中指定两个锚点,第1个锚点和物体1相连,第2个锚点和物体2相连;这两个点的位置也确定了距离约束的长度
var jointDef:b2DistanceJointDef = new b2DistanceJointDef();
jointDef...
everyinch
13年前 (2011-10-03) 5284℃
0喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;...
everyinch
13年前 (2011-10-03) 3256℃
0喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;...
everyinch
13年前 (2011-10-03) 3005℃
0喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;...
everyinch
13年前 (2011-10-03) 3307℃
0喜欢
package{
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;
import Box2D.Dynamics.b2Body;
import Box2D...
everyinch
13年前 (2011-10-03) 3104℃
0喜欢
package{
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Collision.Shapes.b2Shape;
import Box2D.Collision.b2AABB;
import Box2...
everyinch
13年前 (2011-10-03) 5215℃
0喜欢
package{
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Collision.Shapes.b2Shape;
import Box2D.Collision.b2AABB;
import Box2...
everyinch
13年前 (2011-10-03) 3944℃
1喜欢
package{
import Box2D.Collision.Shapes.b2CircleShape;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;...
everyinch
13年前 (2011-10-03) 4206℃
2喜欢
package{
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;
import Box2D.Dynamics.Contacts.b2Contact;
...
everyinch
13年前 (2011-10-03) 4320℃
2喜欢