A question about Physics and Collider

:desktop_computer: Game Maker version: Newest one
:grey_question: Item: [Physics]
:speech_balloon: Request Type: [Question]

Hello Sandboxers and in special Game Makers!

I know it is possible to grab an object and put it somewhere else. There is a special Component or Behaviour for this. BUT with this Method i have a Problem, because if i collide with another Object, then this object will tip over.

So i thought, i can fix this problem, by disabling the colliders. This works at the first sight, but then the grabbed object has no gravity and so it keep floating in the air!

Ok… what is my question?

Is it possible to grab an object and put it elsewhere without tip over other objects when i collide with them.

Think about a kind of Chess game. You take the queen as a player but you collide with a pawn, so the pawn tips over (and i want to avoid this!)

I need the possibility to disable Colliders, but keeping Gravity. Both seems not to be possible at the moment.

Thank you for your time and your help

2 Likes

Heyhey.

Just sharing ideas. there probably better ways to do this.
so there probably 2 parts here the 1)pick and place of the object and
2)the “snap”/detection of another object at the location (which is harder to resolve easily).

so the first part, have a smaller object with collision and gravity and a larger collision-hollow object encircling the smaller object.
This allow the smaller object to be picked and gravity to “drop-place” the object.
The larger encircling object with just collisions prevents players from colliding and knocking over the smaller object.

The snap of the object is using health on the chess piece to respawn to tag to the object tag on the floor.
and the tag on the floor has a replace version of it to swap it out with a non-tag version.

its not perfect because you can still place on an existing asset (this would be resolved if there was an invisible block there, but that would mean spawning and removing blocks as you pick and place the piece)

Untitled Project
(the last part is the placed block tipping over the other existing piece)

of course… all of this would have been easier if
1)actor property would be able to directly change the gravity on an object via a msg. During testing realize that it was possible to turn off the gravity of an object. but not turn the gravity back on.
2)teleport component worked on an asset.

personally… think the lack of gravity-on control is either a bug or missing feature. perhaps raising this as a bug/feature request would be better solution to the above “workaround”

2 Likes

Woowww thank you so much for such a detailed answer! I need to take a look at it and playing around! I really appreciate your effort for me! :blue_heart:

1 Like