Search Unity

How to move an object randomly x,y and z direction

Discussion in 'iOS and tvOS' started by jpsubbarayalu, Aug 17, 2010.

  1. jpsubbarayalu

    jpsubbarayalu

    Joined:
    Jul 13, 2010
    Posts:
    65
    Hi All,

    My project is based on like bee movements randomly towards the Camera.Currently what i did is first i am moving the bee in z direction after that while coming z position some value i am changing the bee direction [x and y].After that bee moving towards the camera[z direction]. But while seeing in the Scene its not looking good.My requirement is i need to move the bee randomly in x,y and z direction.If anybody know about this please guide me.


    Thanks,
     
  2. jpsubbarayalu

    jpsubbarayalu

    Joined:
    Jul 13, 2010
    Posts:
    65
    Hi All,

    Is anybody there?..Please reply...
     
  3. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    Use a bit of AI , like simple behavior , constantMove in your Z maybe and in parallel a wander behavior that you update with new XY direction every XX second or less, coupled with a weight value on both function so you can drive which one drive the other, then update your bee direction with these both result.