No announcement yet.

Physics Handle grab problem

  • Filter
  • Time
  • Show
Clear All
new posts

    Physics Handle grab problem


    I have problem with physics handle grab operation. As long as I click on object everything is ok, but when I click somewhere else (nothing should happen) object jumps/moves in random direction.

    Here is video with my problem:
    Video with problem

    Here is my blueprint:
    Click image for larger version

Name:	Bez tytułu.png
Views:	1
Size:	431.4 KB
ID:	1166209

    Trace Function
    Click image for larger version

Name:	Bez tytułu2.png
Views:	1
Size:	359.7 KB
ID:	1166211

    Do you have any ideas what is wrong?

    Thanks in advance
    Last edited by Xter; 11-03-2015, 07:25 AM.

    Any ideas? This problem is rather urgent. For me it seems like problem is inside trace function. Bad component is returned but dont know why and what should I do to fix it because everything seems normal there.

    PS. Verry sorry to bump this but 3 days passed from first post
    Last edited by Xter; 11-05-2015, 08:01 AM.


      How can you click on anything else if when you release the button it drops the item?


        You should branch on the return value of your single line trace, it's false when nothing is hit, that's why you would get accessed none, only continue if it's true, you wouldn't need the IsValid macro then.

        If hit object does not have the tag (i presume this means it isn't grabbable), you should return and not continue, have your function return a bool, true if it got on an a grabbable actor, and false otherwise. All failures here should return false.
        After the trace function you branch on the trace result, and only grab component if it's true. This will also stop accessed none errors.

        Possibly you should set grabbed component to none if it didn't hit a grabbable actor. Your event tick should only continue if PhysicsGrabbedComponent is valid AND physcicshandle is active, that might be redundant but, just to be sure.

        I done this in the character, so replace reference to self with your character:
        pretty much the same except the branch:

        Click image for larger version

Name:	sM2tKmn.png
Views:	1
Size:	373.1 KB
ID:	1092663

        the trace: (note the multiple return nodes)

        Click image for larger version

Name:	CVuGbRF.png
Views:	1
Size:	443.7 KB
ID:	1092664

        This should fix any problems with accessed none. It works fine for me, if it doesn't for you,. there musn't be something else wrong. I notice you are using the old trace? Don't know how that will affect it.


          Thank you very much! It seems to work now. That's how great community helps bring creative projects to life.