playMaker

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

kiriri

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« on: December 23, 2012, 06: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, 07:18:03 AM by kiriri »
Best,
Sven

escpodgames

  • Hero Member
  • *****
  • Posts: 685
    • View Profile
    • Assets
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #1 on: January 14, 2013, 03: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
    • View Profile
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #2 on: June 06, 2016, 02: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
    • View Profile
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #3 on: June 06, 2016, 03: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
    • View Profile
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #4 on: July 15, 2016, 08:08:22 AM »
Are they on ecosystem?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14035
  • Official Playmaker Support
    • View Profile
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #5 on: July 19, 2016, 04: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: 182
    • View Profile
    • Haven Made
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #6 on: December 12, 2017, 08: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: 14035
  • Official Playmaker Support
    • View Profile
Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
« Reply #7 on: April 17, 2018, 12: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