is it possible to detect when being touched by a laser?
I'd like a gadget to triggers when a laser touches it.
The laser can detect when it touches something, but that "something" doesn't know it's touched.
Object has the "detected" properties, when a zone trigger touches a specific scene object. But is there a similar sensor when touched by a laser?
it could be useful to activate events on the touched object.
for example, animating specific pointed object, triggers keyframes, etc.
I'm trying to trigger a text gadget to display the enemy name I'm pointing at for a diablo-like game. when touched (looked at, not physical collision), it would trigger the keyframe to display the text gadget containing its name.
There are maybe another solution, but I have laser in mind and thought a laser touched detector could be useful too.
If it's not possible, I'd like to suggest that feature.
it could be added to both objects and zone triggers.
for zone triggers, the "element to detect" could add "laser", with or without a name tag, to limit to a specific laser.
For objects or groups, it could also trigger "detected", or a new "touched" variable with ability to specify a laser's name if needed.
when the object or gadget is touched, it would send True.
does something like that exist already?
-
answering myself :p
Maybe I can spawn either a trigger zone or a tag, at touched coordinate. That would act as laser detector, but it'll be an area around the object and could trigger more than one object at once if they are too near of each others. I'll try with that method.
Having a real laser "touched" variable on a group/object might be useful. -
Exactly. That's the method I use.
Here's a tutorial where I make something like that. It uses a setup from a previous tutorial that finds the point the imp is pointing at. But the logic-at-position stuff is covered in this video. https://www.youtube.com/watch?v=WwUfkNQLzZU -
Thank you for the two video tutorials :)
and thanks for all your documentations, I didn't have time to read all yet, but it's very useful. -
I don't know all the available tools yet, so I didn't thought about the "hover" properties of the imp.
Is it possible to set the imp position without possessing?
If it is, I could spawn an imp tag positioning at laser's pointer, and use the imp hover properties to detect highlighted object!
I suppose the tag for imp possession position doesn't have the tip detected at the end? I'll try that later today.
If not, I'll just use a zone/tag detector.
thanks again :)
edit:
I couldn't to do what I wanted: spawn the imp at target point to use the hover properties.
I have a laser in a puppet pointing forward to detect front enemies in order to display its name, even if far from the player. at laser collision I emitted an object with a tag, its position is linked to imp location when possessed, but the imp didn't appear. Maybe a problem with imp possession as I have multiple controller gadget in the puppet. I feel like I'm doing random tries and errors.
I realized laser might not be what I need as it might point higher/lower than the enemy even if located in front. I might need another element detector method.
but I think having a "touched" properties for object/groups might be useful to other players too. It'll be easier than needing to spawn something and detect it.
Please sign in to leave a comment.