Playmaker Forum

PlayMaker News => General Discussion => Topic started by: basonliew on June 24, 2020, 03:50:22 AM

Title: Fast Moving Object Detection
Post by: basonliew on June 24, 2020, 03: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!
Title: Re: Fast Moving Object Detection
Post by: djaydino on June 24, 2020, 01:43:04 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)
Title: Re: Fast Moving Object Detection
Post by: basonliew on June 24, 2020, 11: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!
Title: Re: Fast Moving Object Detection
Post by: djaydino on June 25, 2020, 05:41:37 AM
Hi. You can use a 'Next Frame Event'
after that get the new position.