playMaker

Author Topic: raycast from screen  (Read 1247 times)

Ofonna

  • Full Member
  • ***
  • Posts: 230
raycast from screen
« on: April 03, 2017, 04:20:18 AM »
hi guys, i'm trying to do a screen pick or raycast from screen but no matter what screen coordinate vector i use, only (0.0,0.0) works, i'm trying to use (0.5,0.5) which is the center of the screen.....please if anyone can test this i'd ne very appreciative

thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: raycast from screen
« Reply #1 on: April 03, 2017, 07:57:55 AM »
Hi,

 Check the tooltip for that screen Position property:

Screenspace is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight).

 so 0.5 isn't going to cut it :)

 Bye,

 Jean

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: raycast from screen [solved]
« Reply #2 on: April 03, 2017, 02:18:04 PM »
oooh! thank you jean! ....I just followed your instructions and it worked