playMaker

Author Topic: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize  (Read 6434 times)

kiriri

  • Hero Member
  • *****
  • Posts: 506
UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« on: December 23, 2012, 08:58:37 AM »
This is for the most part the default raycast action. It has one more function though, as it allows you to get the uv coordinates of the collision point, if the collider is a mesh collider.

Together with GetTextureSize , SetPixelColor, GetPixelColor and ApplyTextureChanges ( http://hutonggames.com/playmakerforum/index.php?topic=2778.0 ), this will allow you to do all kinds of drawing and texture editing ingame.
Not to mention permanent and ,after the creation, free decals.
« Last Edit: December 23, 2012, 09:18:03 AM by kiriri »
Best,
Sven

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #1 on: January 14, 2013, 05:40:06 PM »
Hi Kiriri,

Awesome work btw! Do you think you could explain how to get "permanent and ,after the creation, free decals" using your actions.

psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #2 on: June 06, 2016, 05:52:43 PM »
hello

i'm trying to use the action UVRaycast.cs but
in the category DEBUG the value of "pixel UV" remains always (0.0,0.0)
while the rest of the raycast seem to work weel (i can see it with debugdisplay and i can retrieve all other infos using "get raycast hit info"

basically what i wanted to do is "get material texture" once i identify the material
that was collided and then make a "Get pixel color"
this way i want to retrieve the color of the pixel that was hit by the UVRaycast.

thoughts anyone ?

is this action too old / deprecated ?



psypol

  • Playmaker Newbie
  • *
  • Posts: 39
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #3 on: June 06, 2016, 06:02:27 PM »
sorry it worked after i added a MeshColider to my blocks

now i have the UV info as a hint between 0 and 1
so i guess i have to use GetTexture size to convert the 0to1,0to1 float coordinates to real int,int texture coordinates to use this with Get pixel color

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #4 on: July 15, 2016, 11:08:22 AM »
Are they on ecosystem?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #5 on: July 19, 2016, 07:51:29 AM »
Hi,

 I don't think so. I have this thread on my todo for a long time, I do want to move them to the ecosystem... unless someone already done it?

Bye,

 Jean

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #6 on: December 12, 2017, 10:40:27 AM »
Heck yeah lets get these moved over to Ecosystem! I just keep coming back to my bookmark of them :P

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #7 on: April 17, 2018, 03:42:22 AM »
Hi,

 GetTextureSize is now up on the Ecosystem, but for the other actions, I'll do this differently, because we already have a mechanism for saving raycast hit infos, using the action GetRaycastHitInfo, so I'll check if we can't get these actions to also use this, instead of making whole duplicates for this.

 Bye,

 Jean