1. #1

    object positioning event, rotation

    i wanted to make a heat seaking misile and i got the movement down

    now i just need to make it "point" in the right directions

    anyone knows the basics for this i need to know what corners i have to give in where

    so basicly if its jaws : artan(x/y) or whatever order x y and z shoud be
    pitch: artan(y/z)
    3th one: artan(z/x)

    and if i have to calculate x by taking (x of target - x misile) or the other way around

    tried a bit through trial and error but that didn't work
    Share this post

  2. #2

    Re: object positioning event, rotation

    I tried this out too , X,Y,Z co-ords everywhere , measuring distances and using trigonometry to work out a vector, but I saved it to work out later.

    You could glue a directional force to the rocket, and have the force target an object (or rider) , but doing it this way it would need to stay within the physics bubble.
    Share this post

  3. #3

    Re: object positioning event, rotation

    hmm might have found a way to solve it in a harder way

    add a cosutom game camera to my misile and let it point to my target
    Share this post

  4. #4

    Re: object positioning event, rotation

    Ahh I see then set your missiles rotation to the same rotation as the custom camera. Lt me know if you get it working.
    Share this post

  5. #5

    Re: object positioning event, rotation

    i got it kinda to work in a different way just with 2 angles but it depends on location so i added some logic to make it work everywhere)
    not perfect but close because i notice some flaws sometimes
    Share this post

  6. #6

    Re: object positioning event, rotation

    I'm struggling to recall my 3d translation matrixes

    anyone got a few handy rotation shortcuts giving FPS near camera offsets for example.
    pretty much any repository of this kind of info would be invaluable round about now.

    Suppose I should just go work it out but if someone has tidy maths solution nevr hurts to ask.

    Many thanks
    Share this post