I brought a 3d model from blender(.fbx) and the collision box is stuck in the ground
Right, that is expected, all collision shapes (except the model type) are centered to the entity position.
If you would like use a box shape for collision, you can do the following:
- remove the collision component from this entity
- add a child entity that has a box collision component attached
- position this child entity at where the box should be centered
Otherwise you can use the more expensive (performance wise) Model collision and drag and drop your model there, but that will not work correctly for dynamic objects when colliding with other Model collision bodies.
That’s correct, because your entity now doesn’t have a collision component. You will have to do something like this:
this.entity.findByName('Box').collision.on('collisionstart', this.onCollisionStart, this);
You will need to update the rest of your scripts in the same manner.
To use the Box entity for collision checking, and not your original parent entity.