On a collision, how do i get the X/Y of that collision

Get help using Construct 2

Post » Sun May 07, 2017 6:46 pm

Image

the the code above when the bounding box of the bullet is overlapping the tile map

i am using the bullets X and Y to resolve the tile map X,Y coordinate, to then change tile. but the thing is when i resolve those coordinate i'm actually using the bullets origin image Point which might not be inside the tile that just got collided with.

is there a way to get the exact collision X/Y, or a better way to handle this kind of situation?
B
47
S
26
G
2
Posts: 31
Reputation: 4,937

Post » Sun May 07, 2017 8:28 pm

I would do it like this:
Did you tried that option: make a new origin point and set him to the right. And than you can choose between these two points. Set tileX to bullet.X(origin2).
Try this but im not sure if its working.
My Project at this time: robottory-2d-platformer-devlog_t190807



(Sorry for my english. I know it is not the best)
B
12
S
7
G
4
Posts: 102
Reputation: 3,046


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests