Fehler beim Platzieren von Objekten behoben

This commit is contained in:
2026-10-06 08:54:09 +02:00
parent c3e028b9f8
commit 867a895c6e
37 changed files with 25 additions and 2 deletions

View File

@@ -112,6 +112,7 @@ public class WorldObjectsState extends BaseAppState {
// Baum-Stammkollision: Capsule statt Vollmesh (Blätter ausgeschlossen)
String objPath = m.modelPath() != null ? m.modelPath() : "";
boolean hasCustomCollision = objPath.startsWith("Models/trees/") || objPath.contains("/grapevine/");
if (objPath.contains("/grapevine/") && bulletAppState != null) {
try {
s.updateGeometricState();
@@ -149,8 +150,8 @@ public class WorldObjectsState extends BaseAppState {
}
}
// Physik-Kollision für solide Objekte
if (m.solid() && bulletAppState != null) {
// Physik-Kollision für solide Objekte (nicht für Bäume/Reben – die haben eigene Kollision oben)
if (m.solid() && !hasCustomCollision && bulletAppState != null) {
try {
RigidBodyControl rbc = new RigidBodyControl(
CollisionShapeFactory.createMeshShape(s), 0f);