fix shape dimension
This commit is contained in:
parent
ab415f2ee6
commit
af762f205a
@ -72,14 +72,14 @@ fun buildShape(
|
|||||||
shape: Shape,
|
shape: Shape,
|
||||||
material: Material
|
material: Material
|
||||||
): ModelRenderable {
|
): ModelRenderable {
|
||||||
val dimension = Vector3(0.1f, 0.1f, 0.1f)
|
val center = Vector3(0.0f, 0.0f, 0.0f)
|
||||||
return when (shape) {
|
return when (shape) {
|
||||||
Shape.CUBE -> ShapeFactory
|
Shape.CUBE -> ShapeFactory
|
||||||
.makeCube(dimension, Vector3(0.0f, 0.0f, 0.0f), material)
|
.makeCube(Vector3(0.2f, 0.2f, 0.2f), center, material)
|
||||||
Shape.CYLINDER -> ShapeFactory
|
Shape.CYLINDER -> ShapeFactory
|
||||||
.makeCylinder(0.1f, 0.3f, Vector3(0.0f, 0.0f, 0.0f), material)
|
.makeCylinder(0.1f, 0.2f, center, material)
|
||||||
Shape.SPHERE -> ShapeFactory
|
Shape.SPHERE -> ShapeFactory
|
||||||
.makeSphere(0.1f, dimension, material)
|
.makeSphere(0.1f, center, material)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user