G
GRANDface
Guest
Hello,
I need a help with collision bug.
I have been making top down tanks game. Where I have an object named obj_tank without any sprite, and that objects is for creating all of the components of the tank, such as: obj_tank_body, obj left and obj right wheel, obj_tank_engine, obj_tank_fuel, obj_tank_tower, obj_tank_barrel, obj_tank_exhaust:
Also the obj_tank creates a tank crew: obj_driver, obj_shooter, obj_aimer, these objects control the whole tank etc.
If I move or rotate the obj_tank, all of the components will follow the object and also rotate the same.
And so every tank component checks for a collision with an obj_solid_wall:
And if one of the tank components have a collision with the obj_solid_wall, it lowers the speed of the tank:
Heres the video of a collision:
Now the problem is, that if I rotate the whole tank(obj_tank), and then move the tank around the wall(corners), an invicible collision will happen:
Note: obj_tank_body is the only one object checking the collision in the video. But it would do the same issues with other tank components.
obj_tank_body:
If the obj_tank image_angle is about 180 degrees, then the invisible collision wont happen.
I dont know how to solve the problem, if someone knows the answer please help me. I think it has something to do with the collision mask, like maybe the mask isnt rotating?
Thanks.
I need a help with collision bug.
I have been making top down tanks game. Where I have an object named obj_tank without any sprite, and that objects is for creating all of the components of the tank, such as: obj_tank_body, obj left and obj right wheel, obj_tank_engine, obj_tank_fuel, obj_tank_tower, obj_tank_barrel, obj_tank_exhaust:
Also the obj_tank creates a tank crew: obj_driver, obj_shooter, obj_aimer, these objects control the whole tank etc.
If I move or rotate the obj_tank, all of the components will follow the object and also rotate the same.
And so every tank component checks for a collision with an obj_solid_wall:
And if one of the tank components have a collision with the obj_solid_wall, it lowers the speed of the tank:
Heres the video of a collision:
Now the problem is, that if I rotate the whole tank(obj_tank), and then move the tank around the wall(corners), an invicible collision will happen:
Note: obj_tank_body is the only one object checking the collision in the video. But it would do the same issues with other tank components.
obj_tank_body:
If the obj_tank image_angle is about 180 degrees, then the invisible collision wont happen.
I dont know how to solve the problem, if someone knows the answer please help me. I think it has something to do with the collision mask, like maybe the mask isnt rotating?
Thanks.