edited June 2015 in Makinom Support
is there a way to check what material or texture a raycast is hitting?
Post edited by wtyson on
new website can be found here http://www.fore-loregames.com

Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

or check out the face book page here https://www.facebook.com/ForeLoreGames
  • edited June 2015
    Not directly - raycasts only hit colliders, so you'll have to add/set the hit game object to the found objects and go from there.
    I.e. get material/texture from whatever component is using it :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • can makinom find multiple hit objects with multiple raycast from same schematic or will they overwrite each other?
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • also there seems to not be a node for getting the texture of a game object
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • Sure, you can use as many raycast nodes as you want (also, a raycast can optionally find multiple objects). You can add the hit game objects to the found objects, using Add change type will add objects to the list, using Set will clear the list first.

    You can't really get the texture, as there is nowhere to put them to. However, you can use the Check Fields node to check which texture or material is used by a component.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • ahh yeah didnt think of that thanks
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • edited June 2015
    ok seems raycast cant store the gameobject hit. it has hit point, distance , an normal but no game object..


    scratch that you can pull the found game object from all the steps but still cant store it in a variable. but guess thats ok since you can start a tagged machine on the hit object so ill make a request for storing the hit objects in the request forums
    Post edited by wtyson on
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
  • Game objects can only be stored in the Found Objects or Global Objects, not in variables.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • hmm yeah it works fine as is. just was asking cause playmaker had a a way to store them in there own variables.
    new website can be found here http://www.fore-loregames.com

    Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games

    or check out the face book page here https://www.facebook.com/ForeLoreGames
Sign In or Register to comment.