playMaker

Author Topic: Add component to an object using a object variable as the target  (Read 321 times)

gssev

  • Playmaker Newbie
  • *
  • Posts: 2
Add component to an object using a object variable as the target
« on: February 14, 2024, 04:17:01 PM »
I cant seem to add a component to an object using a variable as the object  reference which I get using a raycast but it could be any way as Ive tried other methods. If I just refeerence the object directly it works fine but thats no use in what I require. Is this a bug or am I missing a something?


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Add component to an object using a object variable as the target
« Reply #1 on: February 18, 2024, 10:09:11 AM »
on the 1st frame the variable might still be empty and the add component is called only once.

use the hit event and set a state 2, do the add component there