S
Skull_k
Guest
Hi,
I use IDE V2.1.0.212 and run time 2.1.0.136.
In GMS2 manual, we can find the following sentence with the picture for place_meeting :
"This will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected otherwise only bounding box collisions are applied. "
I tried to reproduce the example but i didn't have the result expected :
-I created two sprites : a cricle with precise collision ( i chose "precise (slow)" in collision mask)
a rectangle with not precise collision (i chose "Rectangle (fast)" in collision mask).
-I create two objects : a circle with the circle sprite (collision mask is "Same As Sprite")
a rectangle with the rectangle sprite (collision mask is "Same As Sprite")
In circle object step event, i put this code (it is my only code in the game):
if place_meeting(x,y, O_Rectangle) {
show_message("Collision") ;
}
And i placed the circle and the rectangle like this in the room :
I expected to have a message "Collision" but game maker does not detect the colision.
When i put sprite circle with not-precise collision mask, it detects a collision...
So, does someone could explain why i have this behaviour ?
I use IDE V2.1.0.212 and run time 2.1.0.136.
In GMS2 manual, we can find the following sentence with the picture for place_meeting :
"This will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected otherwise only bounding box collisions are applied. "
I tried to reproduce the example but i didn't have the result expected :
-I created two sprites : a cricle with precise collision ( i chose "precise (slow)" in collision mask)
a rectangle with not precise collision (i chose "Rectangle (fast)" in collision mask).
-I create two objects : a circle with the circle sprite (collision mask is "Same As Sprite")
a rectangle with the rectangle sprite (collision mask is "Same As Sprite")
In circle object step event, i put this code (it is my only code in the game):
if place_meeting(x,y, O_Rectangle) {
show_message("Collision") ;
}
And i placed the circle and the rectangle like this in the room :
I expected to have a message "Collision" but game maker does not detect the colision.
When i put sprite circle with not-precise collision mask, it detects a collision...
So, does someone could explain why i have this behaviour ?
Attachments
-
4.2 KB Views: 2