playMaker

Author Topic: BoxCast Help I cant MAke it Work  (Read 2887 times)

utopien

  • Playmaker Newbie
  • *
  • Posts: 37
BoxCast Help I cant MAke it Work
« on: March 07, 2018, 09:15:10 AM »
hi everyone i am traing to use the box cast action but i can't makje it work th debug show noting and i get no value from any variable please if some one can tell me why  or send me tutorial  than would be great

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: BoxCast Help I cant MAke it Work
« Reply #1 on: March 07, 2018, 09:43:32 AM »
Hi,

If I remember correctly, it actually has no debug script. Its a fair amount of work to write a simple debug for a box it turns out.

I ended up writing my own custom action using a physics check box instead of box casting. Maybe it will also fit your needs.
https://docs.unity3d.com/ScriptReference/Physics.CheckBox.html

Make sure the game object has a box collider when using this action.

utopien

  • Playmaker Newbie
  • *
  • Posts: 37
Re: BoxCast Help I cant MAke it Work
« Reply #2 on: March 07, 2018, 11:32:02 AM »
thanks for custum Cs it work fine but unfortinaly i need an hit point position , Distance and the Normal of the surface but thnaks a lot for reply

Doh

  • Full Member
  • ***
  • Posts: 124
Re: BoxCast Help I cant MAke it Work
« Reply #3 on: March 08, 2018, 05:51:58 AM »
I had similar issues with SphereCast, it didn't present a visual debug like raycast does, I ended up attaching a couple of actual spheres at the origin and end points so I could get my head round it.

In terms of it not actually hitting anything, as a guess I'd take a close look at your direction, distance and layer mask values.

utopien

  • Playmaker Newbie
  • *
  • Posts: 37
Re: BoxCast Help I cant MAke it Work
« Reply #4 on: March 09, 2018, 05:48:07 PM »
thanks i ll try that