Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision bug
#6
(15-04-2024, 02:13 PM)bozdo Wrote: it's doesnt do much
updated code
Code:
public void Spawn(JellyObject prefab, Vector3 position, Quaternion rotation, Action<JellyObject> OnSpawn = null)
    {
        instances++;
        int id = instances;

        JellyObject jelly = Instantiate(prefab, position, rotation);
        jelly.transform.SetParent(jellyParent);

        spawnedObjects.Add(jelly);
        SetRandomColor(jelly);

        jelly.spawnID = id;

        OnSpawn?.Invoke(jelly);
    }

As per my first post: have you checked the collision filters, in case they’re set to not collide with each other?

These are set on a per-particle basis on the blueprint. I assume you’ve created the blueprint in-editor, then assigned it to the prefab instantiated by this code?
Reply


Messages In This Thread
Collision bug - by bozdo - 15-04-2024, 11:21 AM
RE: Collision bug - by josemendez - 15-04-2024, 12:05 PM
RE: Collision bug - by bozdo - 15-04-2024, 12:38 PM
RE: Collision bug - by josemendez - 15-04-2024, 01:19 PM
RE: Collision bug - by bozdo - 15-04-2024, 02:13 PM
RE: Collision bug - by josemendez - 15-04-2024, 03:30 PM
RE: Collision bug - by bozdo - 15-04-2024, 03:43 PM
RE: Collision bug - by josemendez - 15-04-2024, 04:06 PM
RE: Collision bug - by bozdo - 15-04-2024, 04:12 PM