Search Unity

how to clamp x axis from transform foward prespective?

Discussion in 'Scripting' started by halevi, Jan 2, 2022.

  1. halevi

    halevi

    Joined:
    Dec 13, 2020
    Posts:
    35
    i moved object according mouse position with raycast (in 3d world)i would like to know how can i clamp in any given situation my position and rotation of my x axis that relative to my transform foward , not generaly relative to the world , any ideas? thanks in advance