Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: kiriri on December 23, 2012, 08:58:37 AM

Title: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: kiriri 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.
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: escpodgames 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.
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: psypol 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 ?


Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: psypol 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
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: dudebxl on July 15, 2016, 11:08:22 AM
Are they on ecosystem?
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: jeanfabre 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
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: craigz 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
Title: Re: UVRaycast, UVScreenCast, UVMousePick and GetTextureSize
Post by: jeanfabre 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