I made a script that creates hundreds of cubes using bpy.ops.object.duplicate(linked=True)
that are given an initial velocity push upwards but the problem is that sometimes the cubes collide with one another in the beginning as shown in the orange circle area because they are too close and touching each other. This happens after physics simulation takes over after a few frames of animation when i set Animated
(which is rigid_body.kinematic
) to False
via script. Adjusting this animation phase solely to make sure the cubes don't touch each other is a pain and will unlikely give me the desired projectile simulation result. So i need a way to temporarily disable collision detection. I will turn on collision detection later in the timeline. So i need something like this:
o.rigid_body.collision_detection = False
o.keyframe_insert(data_path = "collision_detection?", frame = frame_off_collision)
o.rigid_body.collision_detection = True
o.keyframe_insert(data_path = "collision_detection?", frame = frame_on_collision)
I have also tried the answer of @Ratt's script and i can see that collision is disabled (closed eye icon) but the cubes still collide