playMaker

Author Topic: Fast Moving Object Detection  (Read 362 times)

basonliew

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Fast Moving Object Detection
« on: June 24, 2020, 12:50:22 AM »
Hi! Can anyone help me with detecting fast-moving object detection? I am currently using a dragging object with mouse down and trigger if collide with the Stop Point object. I had done some research but could not find any of them using Playmaker.. I sincerely appreciate and hope if any could help me out!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
    • jinxtergames
Re: Fast Moving Object Detection
« Reply #1 on: June 24, 2020, 10:43:04 AM »
Hi,
You can set the trigger (or add another trigger action) to 'On Trigger Stay'

But if you are dragging something with your mouse fast it might still not help as it will depend on your frame rate.

Something that might help is when start drag get the position, then next frame get the next position, then do raycast between the 2 points.
then set then 'next position' variable to the 'current position' variable
and loop (do next frame and get position again)

basonliew

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Fast Moving Object Detection
« Reply #2 on: June 24, 2020, 08:44:13 PM »
Hi,
You can set the trigger (or add another trigger action) to 'On Trigger Stay'

But if you are dragging something with your mouse fast it might still not help as it will depend on your frame rate.

Something that might help is when start drag get the position, then next frame get the next position, then do raycast between the 2 points.
then set then 'next position' variable to the 'current position' variable
and loop (do next frame and get position again)

Hi djaydino, I appreciate your kind reply! I am trying to figure out how to capture the next position from next frame in Playmaker, as in not sure how the mechanism works in Playmaker  :( I will try to figure it out, thanks again!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5379
    • View Profile
    • jinxtergames
Re: Fast Moving Object Detection
« Reply #3 on: June 25, 2020, 02:41:37 AM »
Hi. You can use a 'Next Frame Event'
after that get the new position.