#Problem with collision of objects

2 messages · Page 1 of 1 (latest)

tall warren
#

I don't know how to make two objects collide.

  1. I have imported a rigged tulip into Godot 4.2.1.
  2. I created a physical skeleton for it by using the built-in function Godot provides. The skeleton contains physical bones and inside each bone is a collision shape. All of that was automatically created by Godot.
  3. In the scenegraph, I put that skeleton into a RigidBody3D
  4. I duplicate that RigidBody3D (RB1) to create a second tulip. I place the second Rigidbody3D (RB2), which contains the second tulip, next to the first one.
  5. I attach a script to RB1 to move it in the direction of RB2, to make them collide, but it doesn't work. I use that script:
func _process(delta):
    move_and_collide(Vector3(0.01, 0, 0), false)
    pass

Any idea why the collision doesn't work? I appreciate any help. Thank you!

fiery fox
#

you don't need physical bones for collision. you just need a CollisionShape as the direct child of whatever PhysicsBody you're using