本文整理汇总了Java中com.jme3.bullet.objects.PhysicsRigidBody.setAngularFactor方法的典型用法代码示例。如果您正苦于以下问题:Java PhysicsRigidBody.setAngularFactor方法的具体用法?Java PhysicsRigidBody.setAngularFactor怎么用?Java PhysicsRigidBody.setAngularFactor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.bullet.objects.PhysicsRigidBody
的用法示例。
在下文中一共展示了PhysicsRigidBody.setAngularFactor方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.jme3.bullet.objects.PhysicsRigidBody; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule in = im.getCapsule(this);
this.radius = in.readFloat("radius", 1);
this.height = in.readFloat("height", 2);
this.mass = in.readFloat("mass", 80);
this.physicsDamping = in.readFloat("physicsDamping", 0.9f);
this.gravityDamping = in.readFloat("gravityDamping", 0.0f);
this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0)));
rigidBody = new PhysicsRigidBody(getShape(), mass);
jumpForce.set(new Vector3f(0, mass * 5, 0));
rigidBody.setAngularFactor(0);
}
示例2: read
import com.jme3.bullet.objects.PhysicsRigidBody; //导入方法依赖的package包/类
@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule in = im.getCapsule(this);
this.radius = in.readFloat("radius", 1);
this.height = in.readFloat("height", 2);
this.mass = in.readFloat("mass", 80);
this.physicsDamping = in.readFloat("physicsDamping", 0.9f);
this.jumpForce.set((Vector3f) in.readSavable("jumpForce", new Vector3f(0, mass * 5, 0)));
rigidBody = new PhysicsRigidBody(getShape(), mass);
jumpForce.set(new Vector3f(0, mass * 5, 0));
rigidBody.setAngularFactor(0);
}
示例3: PlayerControl
import com.jme3.bullet.objects.PhysicsRigidBody; //导入方法依赖的package包/类
public PlayerControl(Player player, float mass, Camera cam){
super();
this.player = player;
rigidBody = new PhysicsRigidBody(getShape(),mass);
this.cam = cam;
rigidBody.setAngularFactor(0);
viewDir = new Vector3f(0,0,0);
}
示例4: AdvancedCharacterControl
import com.jme3.bullet.objects.PhysicsRigidBody; //导入方法依赖的package包/类
/**
* Creates a new character with the given properties. Note that to avoid issues the
* final height when ducking should be larger than 2x radius. The jumpForce will be
* set to an upwards force of 5x mass.
*
* @param radius
* @param height
* @param mass
*/
public AdvancedCharacterControl(float radius, float height, float mass) {
this.radius = radius;
this.height = height;
this.mass = mass;
rigidBody = new PhysicsRigidBody(getShape(), mass);
jumpForce = new Vector3f(0, mass * 5, 0);
rigidBody.setAngularFactor(0);
}
示例5: BetterCharacterControl
import com.jme3.bullet.objects.PhysicsRigidBody; //导入方法依赖的package包/类
/**
* Creates a new character with the given properties. Note that to avoid
* issues the final height when ducking should be larger than 2x radius. The
* jumpForce will be set to an upwards force of 5x mass.
*
* @param radius
* @param height
* @param mass
*/
public BetterCharacterControl(float radius, float height, float mass) {
this.radius = radius;
this.height = height;
this.mass = mass;
rigidBody = new PhysicsRigidBody(getShape(), mass);
jumpForce = new Vector3f(0, mass * 5, 0);
rigidBody.setAngularFactor(0);
}