playMaker

Author Topic: raycast from screen  (Read 419 times)

Ofonna

  • Full Member
  • ***
  • Posts: 230
    • View Profile
raycast from screen
« on: April 03, 2017, 01: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: 14014
  • Official Playmaker Support
    • View Profile
Re: raycast from screen
« Reply #1 on: April 03, 2017, 04: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
    • View Profile
Re: raycast from screen [solved]
« Reply #2 on: April 03, 2017, 11:18:04 AM »
oooh! thank you jean! ....I just followed your instructions and it worked