#to reach the beam to the flower with the
1 messages · Page 1 of 1 (latest)
so
yep
to the angle of the normal
y
huh
i mean yeah
ok so is it clear so far?
Vector2 version could work fine I suppose since your're doing 2D ish
yeah the beam should be reflected to diffirent directions if the mirror changes it z in the rotation
yes use that function
they are all vector2
doesn't matter
vector3 and 2 are interchangeable
vector3 in 2D just gets 0 on the z
yes i first used vector3
then i saw there is no diffirence so i changed it to vector2
so to detect the beam hitting the flower
what should i do
the beam has to hit the cube first
did you remove the layermask from the raycast
ok, come back to that after
so you use the function I sent you
when you hit the white cube
what function
should i use this function in the shoot laser script or the laserbeam script
i think shoot laser one
forget the laserbeam right now
focus on the actual functionality
worry about visuals later
shooting laser, you need to get the laser to be reflected so it can hit somehting
what should i put in this vars
the white cube transform component?
nah u don't need that
make a script for the white cube called Reflector
so just this ?
reflectedObject.position = Vector3.Reflect(originalObject.position, Vector3.right);
put it on the object
no & reflect gives you a direction not a position
then what should i put in the reflector class
nothing for now since it doesn't do anything
is just a way to detect it
for the raycast
so it knows to reflect
so an empty class?
must be monobehavior but yes