Touch blueprint problem (see the GIF)

Hi everyone

I have a problem. I made a blueprint that lets me move an object. and as you see in the gif file it changes sizes when hovers over the other ones. the problem is that it sometimes jumps to the centre of the screen for no reason. for example when i release it on the centre of another object.I want it to sit on the other object.

I will be appreciated if you help me.
Thanks.!
(nahie is a small sphere collision in the orange sphere)

52441-gif.gif

Hi,

whole logic seems a bit weir for me, becuase you use events in your sphere, in this case creating multiple spheres cause multiple events of same type and result will be undesired

try make you code this way can - make left mouse button pressed even in your custom player controller BP and do actions:

  1. check if your cursor already have an object and if it have, do only drops
  2. if cursor don’t have object yet, save reference to clicked object into variable and save boolean state “already have an object”
  3. make tick event in your custom controller BP and move object from variable if “already have an object” still true

p.s. to enlarge pictures right click it and select “open in new tab”, answerhub doesn’t handle this yet in 1 click on image

don’t forget mark question as answered with little gray circle button under any answer (not comment, but whole answer) when problem solved, so anyone else later can have same question and may find solution faster, if you find solution on your own, don’t forget write it too