Announcement

Collapse
No announcement yet.

Problem with object chasing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with object chasing


    I'm doing a script in which object is chasing a second moving object. I used move to component. Its somothing like simulate rocket shooting to a target. I have no idea why "rocket" (Cyllinder) doesn't catch up with target and stops over it. I would like to a rocket to hit the target. Click image for larger version

Name:	zal2.jpg
Views:	39
Size:	77.9 KB
ID:	1733689
    Click image for larger version

Name:	zal.jpg
Views:	35
Size:	316.3 KB
ID:	1733688

    #2
    Hello,
    Have you looked into the Projectile component? It has a homing missile setting that achieves exactly what you want, although I have never used it personally.
    https://www.youtube.com/watch?v=tp4H...ture=emb_title

    Comment


      #3
      Originally posted by haste23 View Post
      I'm doing a script in which object is chasing a second moving object. I used move to component. Its somothing like simulate rocket shooting to a target. I have no idea why "rocket" (Cyllinder) doesn't catch up with target and stops over it. I would like to a rocket to hit the target. Click image for larger version

Name:	zal2.jpg
Views:	39
Size:	77.9 KB
ID:	1733689
      Click image for larger version

Name:	zal.jpg
Views:	35
Size:	316.3 KB
ID:	1733688
      Change your Rocket to this:

      Click image for larger version

Name:	interp.JPG
Views:	47
Size:	138.6 KB
ID:	1733810

      Yours is failing because MoveComponentTo takes a relative location. The rest of your code is dealing with world locations...

      Comment

      Working...
      X