1. #1

    angle an object to follow the rider?

    Ive been trying to make a map where a minigun rotates to follow the rider. I have tried all types of data sources in the object position event but I can't find a way to get this to work. Has anyone found a way to do something like this?
    Share this post

  2. #2

    Re: angle an object to follow the rider?

    use a custom camera, set it to follow the rider, lower its range to keep it from being a view problem, and use the angles from that for your gun. Not sure if game cameras are glue-able, if not you might have to use a -1 multiplier operation to reverse the angle if its not aiming right
    Share this post

  3. #3

    Re: angle an object to follow the rider?

    if you have a mic, ill help you tomorrow. just message me so we can talk.
    Share this post

  4. #4

    Re: angle an object to follow the rider?

    had the same problem, tried the game camera thing to but that didn't work properly, it started doing strange things(probably just my camera settings(i didn't look further into it) but i tried solving it in another way

    currently i do it with 2 angle( this works half of the time while the relative z distance is positive)
    jaws=0, pitch is arctan(z/y), bank arctan(z/x) and than some logic to change
    jaws to 180,and take the negative of x and z isn't perfect but verry close
    Share this post

  5. #5

    Re: angle an object to follow the rider?

    I tried the camera thing and with some minor adjustments to the angles I was able to get it to follow the rider fairly well
    Share this post

  6. #6

    Re: angle an object to follow the rider?

    Hi Yatahe, could I ask how you got this to work?
    Share this post

  7. #7

    Re: angle an object to follow the rider?

    i did the same

    i used a second ope for the camera with global xyz as the object
    select target for targets location
    i had to enable the camera to make it folow the target else it wouldn't rotate
    had to adjust range to 0.1 so it didn't change the camera i was looking trough( not sure if last 2 steps are the best way to keep focus on target for angles and not changing the cam)
    connect info game data scource to the camera for x, y and z angle
    add some 2input operator to add 270 to the y value' (maybe another angle needs to be changed in your case)

    conect in ope the values off jaws pitch and bank with the angles
    Share this post

  8. #8

    Re: angle an object to follow the rider?

    Thanks sparkierjonesz.

    Still yet to really give your way a try as I keep trying to do the complicated stuff first and needed to work on my track but will give this a go. Its something that seems simple in theory but was causing me no end of grief! I think my main problem has been trying to have the gun follow the game cam (the thought being the added zooming on the z axis would be pretty cool). Saying that, zooming could still be accomplished on a custom cam just a lot more work!
    Share this post

  9. #9

    Re: angle an object to follow the rider?

    Can you believe, I still cant get this to work!
    Share this post

  10. #10

    Re: angle an object to follow the rider?

    what isn't working for you?

    is it the angle or something else?
    Share this post