# (Solved)How do I improve the accuracy of Collissions?

Get help using Construct 2

### » Sun Jul 26, 2015 12:30 pm

I have some quite fast moving objects that spawns another object on colission. Quite often the spawned object ends up within the colission polygon, where as I want it to spawn at the edge or preferably outside. Is there any way to correct this or increase the accuracy of the colission checks.?
Last edited by tunepunk on Sun Jul 26, 2015 2:24 pm, edited 2 times in total.
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

### » Sun Jul 26, 2015 12:32 pm

Would it be possible to have the not so fast moving object spawn?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Sun Jul 26, 2015 12:42 pm

@LittleStain I will try and see if it helps.
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

### » Sun Jul 26, 2015 12:50 pm

@LittleStain nope it didn't help. Same result. Maybe i have to resort to using something like this example, to calculate a more exact position when placing the object. Sinc'e it's crucial that it ends up in the exact position that i want.

https://www.scirra.com/tutorials/902/li ... raycasting
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210

### » Sun Jul 26, 2015 1:29 pm

Maybe you could try moving the spawned object in the opposite angle of the bullet angle of motion untill overlap is done..
something like:

while
spawned object is overlapping blabla
- spawned object move 1 px at angle Blip.bullet.angleofmotion-180
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Sun Jul 26, 2015 1:57 pm

if you use physics you can check the bullet box will dramatically change the collision check and wold be more accurate. if you dont use physics then maybe add some extra safety distance? like 1-3 px ?
B
70
S
20
G
67
Posts: 1,314
Reputation: 42,301

### » Sun Jul 26, 2015 2:26 pm

@LittleStain @gamecorpstudio solved it by using the raycasting example. Now they always end up where I want them

the while idea would probably not work in this case, since the spawned object is created at an offset, so not really overlapping anymore. But I'll keep that in mind. That solution might come in handy for some other objects.
or in this thread Archer Devlog
B
35
S
15
G
17
Posts: 944
Reputation: 12,210