Hello everybody! I’m trying to do a simple collision to drag an object.
So I created two boxes. One box is to move to collide with the other box.
Well,… the problem is that when I collide the object passes over it, as part of the map.
What is the simple way to adjust the obstacle box to see that happenig after the collision?
I’m not sure whether I understood you correctly, but if you want that when you collide with the box, it acts like you hit it (moves) apply the rigidbody to that box and on the player you need to have a character controler or rigidbody applied.
Ok! I’ve added something like that said. But I’m still having trouble, so I inserted an image of the project…
…with the properties from the two objects. Actually, what I want is the ball pushing the cube after the collision.
What is wrong in this properties for make it?
Well according to the image the spher should push the box, can you be more specific about what happens when the spher hit the cube, and what you exactly want to happens.
I’m sorry I did it with the sphere and box but still not working. But…that s the only way?
Does anyone make it? and has an proof with it working? or can make a image explaing about?
Because seems very simple, and I’m doing correctly. But when I move the sphere and they collide, the box doesn’t move.
Seems like a wall.
OH wait your using a character controller (slaps face).
Okay, it’s like a wall because a character controller is not a collider rigidbody can use. So this messes things up.
Anyway you would add a sphere collider AS WELL as the character controller. You would also have to uncheck use gravity on the rigidbody.
Exactly like King said, after that set the mass of the box to about 20, and you probably want to set constranis for the rotation (x,z) so that the box dont go crazy when you push it (in properties of the rigidbody component).
But…stil a wall. So I create this video of me using the example:
And I don’t know if is the same as happening with your. Please, could you compare, to find my mistake?
I think this changing to a mission for me, make that object push or just move after colission.
I saw a video that designer use the player to smack the box, and the box after the colission was spinning. Absolutly cool.
But the mass with 1, is already enough to keep the object stationary
If I saw correctly you did not add the collider to the player, the King said that you need the “a sphere collider AS WELL as the character controller” I would advise that you add a capsule collider becouse your player has that shape. After that you will see that the mass of 1 is a way to small, but you experiment with that after you manage to move the cube first.
I did it. But the software said I can not add a sphere or capsule collide because the object has the character controller. It has to be one of the two.
Still very complicated even.
I actually want push and drag the box. And not only keep dragging it without moving it.
Someone else could do this? And could pass me a tutorial … or a video. Because I used what was said and it did not work!
… Should I use some code?
Because that seems simple a lot and I’m stoped at this
Well I’m making some test. I undestand all about the objects. Otherwise thanks all for the help. Mainly King for the example. I will keep that line for conclude it and soon make a answer here.