playMaker

Author Topic: homing missile with target follow, strange rotation behavior  (Read 147 times)

peaks

  • Playmaker Newbie
  • *
  • Posts: 27
    • View Profile
homing missile with target follow, strange rotation behavior
« on: August 10, 2018, 12:55:10 AM »
hey everyone, sorry for that topic name, I can't describe it better ;D I want to create homing missile which follows a target and the missile-tip is constantly facing the target. ( 3D/VR game not 2d).

I tried working with 2 actions, move towards and smooth look at but I get an undesirable side effect - the top of the rocket is rotating and my rocket can't fly "upside down". I have made a small illustration, to give you guys a better idea.



any tips how to achieve this?


« Last Edit: August 10, 2018, 03:06:45 AM by peaks »

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 790
    • View Profile
    • Fat Pug Studio
Have you tried freezing the rotation of the rigidbody?

peaks

  • Playmaker Newbie
  • *
  • Posts: 27
    • View Profile
Have you tried freezing the rotation of the rigidbody?

no rigidbody is involed, but i think freezing the rotation wouldn't help, because I indeed need rotation at some point
« Last Edit: August 10, 2018, 09:35:32 AM by peaks »

peaks

  • Playmaker Newbie
  • *
  • Posts: 27
    • View Profile
aah ok, the rocket does fly upside down now if I set the up vector to 0,0,0 but I think it can't exceed 180°, then i get a superfast rotation which i don't like. hmmm

edit: here's a short video of the situation, have a look how the rocket behave after the looping, it rotates suddenly superfast or does crazy barrel-rolls :D

« Last Edit: August 10, 2018, 02:53:05 AM by peaks »