04-16-2019, 04:42 PM
(04-16-2019, 04:13 PM)_Aka_ Wrote: Hi,
I see two solutions:
1- Coding your own OnControlPointReached: The idea is that even if you don't use a SplineController anymore, nothing stops you from querying the spline with your ow code. In the code I sent you before, there is code that gives you the nearestSegmentStart. You can run this code each frame, and compare the result with the one of the previous frame. If the result is different, then execute the code you would normally execute in OnControlPointReached.
2- Not using OnControlPointReached: OnControlPointReached made sense when the controller was a SplineController. Maybe when using a VolumeController, alterantive logics can work as well. I haven't gave this a deep thinking, but it seems to me that triggering the generator change based on the controller's RealtivePosition instead of based on OnControlPointReached is a valid alternative logic.
PS: your message was duplicated in its middle. Maybe I missed part of it because of that. Let me know if I have missed something
I edited my post to remove the duplicate info.
Your direction makes a lot of sense and I look forward to going home and trying to implement something that takes into account the relative position of the controller. while I'm not new to development I'm new to game development and unity so obvious concepts like this have been alluding me. I think this will actually get me to my goal.
Thank you very much for your guidance. I'll let you know how it goes.