Global vs Local Oscillation

I didn’t see this in the search for topics, sorry if I missed it.

In reference to “Project Boost”: Lessons: Move Obstacles with Code/Mathf.Sin() For Oscilltion
Is there a way for the object to move on the Local axis instead of the Global?

Thanks,
Zach

Hi @iGrok,

Welcome to our community! :slight_smile:

That’s a good question. We manipulate the transform.position directly and do not take any axis into consideration. We just make the object move between two points, hence we cannot move the object on the local axis with this solution.

However, you could certainly develop a different solution to make the obstacle move along its local axis. This would require you to define exactly what you mean by that. If you are able to define the concept, you’ll very likely be able to make your idea work. The more vague your idea is, the less likely it is that you will be able to implement in your project.


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms