当前位置: 首页>>代码示例>>Java>>正文


Java PhysicsRigidBody.setAngularFactor方法代码示例

本文整理汇总了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);
}
 
开发者ID:rockfireredmoon,项目名称:iceclient,代码行数:15,代码来源:AdvancedCharacterControl.java

示例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);
}
 
开发者ID:rockfireredmoon,项目名称:iceclient,代码行数:14,代码来源:BetterCharacterControl.java

示例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);
}
 
开发者ID:Daepso,项目名称:minerim,代码行数:9,代码来源:PlayerControl.java

示例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);
}
 
开发者ID:rockfireredmoon,项目名称:iceclient,代码行数:18,代码来源:AdvancedCharacterControl.java

示例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);
}
 
开发者ID:rockfireredmoon,项目名称:iceclient,代码行数:18,代码来源:BetterCharacterControl.java


注:本文中的com.jme3.bullet.objects.PhysicsRigidBody.setAngularFactor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。